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

Refacotring Image references #1389

Merged
merged 4 commits into from
Feb 24, 2025
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
1 change: 0 additions & 1 deletion .github/workflows/helm-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,3 @@ jobs:
--all \
--validate-maintainers=false \
--target-branch ${{ github.event.repository.default_branch }}
--debug=${{ inputs.debug }}
2 changes: 1 addition & 1 deletion cluster-service/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ deploy:
--set serviceKeyvaultName=${SERVICE_KV} \
--set imageRegistry=${ACR_NAME}.azurecr.io \
--set imageRepository=${IMAGE_REPO} \
--set imageTag=${IMAGE_TAG} \
--set imageDigest=${IMAGE_DIGEST} \
--set azureFirstPartyApplicationClientId=${AZURE_FIRST_PARTY_APPLICATION_CLIENT_ID} \
--set fpaCertName=${FPA_CERT_NAME} \
--set ocpAcrResourceId=$${OCP_ACR_RESOURCE_ID} \
Expand Down
2 changes: 1 addition & 1 deletion cluster-service/deploy/helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ spec:
secretProviderClass: cs-keyvault
initContainers:
- name: init
image: '{{ .Values.imageRegistry }}/{{ .Values.imageRepository }}:{{ .Values.imageTag }}'
image: '{{ .Values.imageRegistry }}/{{ .Values.imageRepository }}@{{ .Values.imageDigest }}'
imagePullPolicy: IfNotPresent
volumeMounts:
- name: rds
Expand Down
4 changes: 2 additions & 2 deletions cluster-service/deploy/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ imageRegistry: ""
# Image Repository
imageRepository: ""

# Image Tag
imageTag: ""
# Image Digest
imageDigest: ""

# log verbosity level
logLevel: "debug"
Expand Down
6 changes: 3 additions & 3 deletions cluster-service/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ resourceGroups:
- name: OIDC_STORAGE_ACCOUNT
configRef: oidcStorageAccountName
- name: IMAGE_REPO
configRef: clusterService.imageRepo
- name: IMAGE_TAG
configRef: clusterService.imageTag
configRef: clusterService.image.repository
- name: IMAGE_DIGEST
configRef: clusterService.image.digest
- name: ACR_NAME
configRef: svcAcrName
- name: OCP_ACR_NAME
Expand Down
6 changes: 4 additions & 2 deletions config/config.msft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ defaults:

# Cluster Service
clusterService:
imageRepo: app-sre/uhc-clusters-service
image:
repository: app-sre/uhc-clusters-service
azureOperatorsManagedIdentities:
cloudControllerManager:
roleName: Azure Red Hat OpenShift Cloud Controller Manager
Expand Down Expand Up @@ -204,7 +205,8 @@ clouds:
maestro:
imageTag: c9a36e110a32c0c25aa5025cfe6d51af797e6d4b
clusterService:
imageTag: 9fd02a4
image:
digest: sha256:aaa14dad6c01f06f2c380e0333db56097aa7b1dd8e696d9b3a8848d7d5362be0
hypershiftOperator:
imageTag: 1bb8b1a
imageSync:
Expand Down
24 changes: 17 additions & 7 deletions config/config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,20 @@
"systemAgentPool"
]
},
"containerImage": {
"type": "object",
"properties": {
"repository": {
"type": "string"
},
"digest": {
"type": "string"
}
},
"required": [
"repository"
]
},
"keyColonValueCSV": {
"type": "string",
"pattern": "^$|^[\\w-\\.]+:[\\w\\/-]+(,[\\w-\\.]+:[\\w\\/-]+)*$"
Expand Down Expand Up @@ -186,11 +200,8 @@
"minLength": 1,
"maxLength": 10
},
"imageRepo": {
"type": "string"
},
"imageTag": {
"type": "string"
"image": {
"$ref": "#/definitions/containerImage"
},
"managedIdentityName": {
"type": "string",
Expand Down Expand Up @@ -284,8 +295,7 @@
"additionalProperties": false,
"required": [
"environment",
"imageRepo",
"imageTag",
"image",
"managedIdentityName",
"k8s",
"azureOperatorsManagedIdentities",
Expand Down
6 changes: 4 additions & 2 deletions config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ defaults:

# Cluster Service
clusterService:
image:
repository: app-sre/uhc-clusters-service
environment: arohcpdev
postgres:
name: arohcp-cs-{{ .ctx.regionShort }}
Expand Down Expand Up @@ -192,8 +194,8 @@ clouds:
imageTag: 8244a76cbc7d020192648b17ac7b7467abf1f2cb
# Cluster Service
clusterService:
imageTag: 9fd02a4
imageRepo: app-sre/uhc-clusters-service
image:
digest: sha256:aaa14dad6c01f06f2c380e0333db56097aa7b1dd8e696d9b3a8848d7d5362be0
azureOperatorsManagedIdentities:
clusterApiAzure:
roleName: Azure Red Hat OpenShift Control Plane Operator Role - Dev
Expand Down
6 changes: 4 additions & 2 deletions config/public-cloud-cs-pr.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,10 @@
}
},
"environment": "arohcpdev",
"imageRepo": "app-sre/uhc-clusters-service",
"imageTag": "9fd02a4",
"image": {
"digest": "sha256:aaa14dad6c01f06f2c380e0333db56097aa7b1dd8e696d9b3a8848d7d5362be0",
"repository": "app-sre/uhc-clusters-service"
},
"k8s": {
"namespace": "cluster-service",
"serviceAccountName": "clusters-service"
Expand Down
6 changes: 4 additions & 2 deletions config/public-cloud-dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,10 @@
}
},
"environment": "arohcpdev",
"imageRepo": "app-sre/uhc-clusters-service",
"imageTag": "9fd02a4",
"image": {
"digest": "sha256:aaa14dad6c01f06f2c380e0333db56097aa7b1dd8e696d9b3a8848d7d5362be0",
"repository": "app-sre/uhc-clusters-service"
},
"k8s": {
"namespace": "cluster-service",
"serviceAccountName": "clusters-service"
Expand Down
6 changes: 4 additions & 2 deletions config/public-cloud-msft-int.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,10 @@
}
},
"environment": "arohcpint",
"imageRepo": "app-sre/uhc-clusters-service",
"imageTag": "9fd02a4",
"image": {
"digest": "sha256:aaa14dad6c01f06f2c380e0333db56097aa7b1dd8e696d9b3a8848d7d5362be0",
"repository": "app-sre/uhc-clusters-service"
},
"k8s": {
"namespace": "cluster-service",
"serviceAccountName": "clusters-service"
Expand Down
6 changes: 4 additions & 2 deletions config/public-cloud-personal-dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,10 @@
}
},
"environment": "arohcpdev",
"imageRepo": "app-sre/uhc-clusters-service",
"imageTag": "9fd02a4",
"image": {
"digest": "sha256:aaa14dad6c01f06f2c380e0333db56097aa7b1dd8e696d9b3a8848d7d5362be0",
"repository": "app-sre/uhc-clusters-service"
},
"k8s": {
"namespace": "cluster-service",
"serviceAccountName": "clusters-service"
Expand Down
Loading