Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add azure runtime config flag to cs service template #621

Merged
merged 1 commit into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cluster-service/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ deploy:
-p IMAGE_REPOSITORY=app-sre/uhc-clusters-service \
-p AZURE_FIRST_PARTY_APPLICATION_CLIENT_ID=$${AZURE_FIRST_PARTY_APPLICATION_CLIENT_ID} \
-p FPA_CERT_NAME=${FPA_CERT_NAME} \
-p IMAGE_TAG=3482df9 | oc apply -f -
-p IMAGE_TAG=9da687c | oc apply -f -

deploy-integ:
oc process --local -f deploy/integration/cluster-service-namespace.yaml | oc apply -f -
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,16 @@ objects:
version_constraints:
min_version: 4.11.0

- apiVersion: v1
kind: ConfigMap
metadata:
name: azure-runtime-config
data:
config.json: |
{
"cloudEnvironment": "AzurePublicCloud"
}
Comment on lines +367 to +370
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In CS, we have a parameter that takes a json obj and set it here (see MR#8478)

config.json: ${AZURE_RUNTIME_CONFIG}

I see that the rest of the configmap values are hardcoded here so i've kept it the same. Is there a preference to parameterise this? Additional configuration that would be added here for example would be ACR configuration that's used in CS (see related jira issue ARO-9331).

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

once additional dynamic configuration is required for an env, you can do something like this here

https://github.com/Azure/ARO-HCP/blob/129323a66958d8122ecacecd1350af3e493967f2/maestro/deploy/helm/agent/templates/maestro.secret.yaml

so basically templating individual inner fields of the json value.

Copy link
Collaborator Author

@JameelB JameelB Sep 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah perfect! I think we can do this as a follow on task, for now we can start with the hardcoded configmap 👍 jira issue to track this: https://issues.redhat.com/browse/ARO-10539


- apiVersion: v1
kind: ServiceAccount
metadata:
Expand Down Expand Up @@ -434,6 +444,9 @@ objects:
- name: config
configMap:
name: clusters-service
- name: azure-runtime-config
configMap:
name: azure-runtime-config
- name: mixin-pull-secret
secret:
secretName: hive-ci-global-pull-secret
Expand Down Expand Up @@ -506,6 +519,8 @@ objects:
- name: keyvault
mountPath: "/secrets/keyvault"
readOnly: true
- name: azure-runtime-config
mountPath: /configs/azure-runtime-config
env:
- name: NAMESPACE
valueFrom:
Expand Down Expand Up @@ -556,6 +571,7 @@ objects:
- --azure-auth-config-path=/secrets/azure-credentials/azure-auth-config
- --azure-first-party-application-client-id=${AZURE_FIRST_PARTY_APPLICATION_CLIENT_ID}
- --azure-first-party-application-certificate-bundle-path=/secrets/keyvault/firstPartyApplicationCertificateBundle
- --azure-runtime-config-path=/configs/azure-runtime-config/config.json
livenessProbe:
httpGet:
path: /api/clusters_mgmt/v1
Expand Down