Skip to content

Commit

Permalink
Add configmap
Browse files Browse the repository at this point in the history
Adds a configmap containing the Azure Client ID of the cluster-service managed identity. Used in PR for configuring Cluser Service Service Accounts
  • Loading branch information
janboll committed Sep 23, 2024
1 parent 3addc56 commit 4360bfa
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cluster-service/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,12 @@ deploy:
-p IMAGE_TAG=9da687c | oc apply -f -

deploy-integ:
oc process --local -f deploy/integration/cluster-service-namespace.yaml | oc apply -f -
AZURE_CS_MI_CLIENT_ID=$(shell az identity show \
-g ${RESOURCEGROUP} \
-n clusters-service \
--query clientId) && \
oc process --local -f deploy/integration/cluster-service-namespace.yaml \
-p CLIENT_ID=$${AZURE_CS_MI_CLIENT_ID} | oc apply -f -

# for local development
provision-shard:
Expand Down
10 changes: 10 additions & 0 deletions cluster-service/deploy/integration/cluster-service-namespace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ parameters:
description: The namespace to create
required: true
value: cluster-service-admin
- name: CLIENT_ID
description: The Azure Client ID used for federation
required: true

objects:
- apiVersion: v1
Expand Down Expand Up @@ -62,3 +65,10 @@ objects:
kubernetes.io/service-account.name: cluster-service-mgmt
namespace: ${NAMESPACE}
type: kubernetes.io/service-account-token
- apiVersion: v1
kind: ConfigMap
metadata:
name: cluster-service-config
namespace: ${NAMESPACE}
data:
cs-client-id: ${CLIENT_ID}

0 comments on commit 4360bfa

Please sign in to comment.