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

CCO-324,CCO-325: pass version to azure operators #372

Merged
merged 2 commits into from
Jun 19, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions assets/csidriveroperators/azure-disk/06_clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,8 @@ rules:
resources:
- infrastructures
- proxies
- clusterversions
- featuregates
verbs:
- get
- list
Expand Down
2 changes: 2 additions & 0 deletions assets/csidriveroperators/azure-disk/08_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ spec:
value: ${KUBE_RBAC_PROXY_IMAGE}
- name: CLUSTER_CLOUD_CONTROLLER_MANAGER_OPERATOR_IMAGE
value: ${CLUSTER_CLOUD_CONTROLLER_MANAGER_OPERATOR_IMAGE}
- name: OPERATOR_IMAGE_VERSION
value: ${OPERATOR_IMAGE_VERSION}
Comment on lines +44 to +45
Copy link
Contributor

Choose a reason for hiding this comment

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

This does not get replaced automatically, you still need to provide the replacement around

pairs := []string{
"${OPERATOR_IMAGE}", os.Getenv(envAzureDiskDriverOperatorImage),
"${DRIVER_IMAGE}", os.Getenv(envAzureDiskDriverImage),
"${CLUSTER_CLOUD_CONTROLLER_MANAGER_OPERATOR_IMAGE}", os.Getenv(envCCMOperatorImage),
}

Same for azure-file

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ack, done.

- name: POD_NAME
valueFrom:
fieldRef:
Expand Down
2 changes: 2 additions & 0 deletions assets/csidriveroperators/azure-file/06_clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,8 @@ rules:
resources:
- infrastructures
- proxies
- clusterversions
- featuregates
verbs:
- get
- list
Expand Down
2 changes: 2 additions & 0 deletions assets/csidriveroperators/azure-file/08_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ spec:
value: ${KUBE_RBAC_PROXY_IMAGE}
- name: CLUSTER_CLOUD_CONTROLLER_MANAGER_OPERATOR_IMAGE
value: ${CLUSTER_CLOUD_CONTROLLER_MANAGER_OPERATOR_IMAGE}
- name: OPERATOR_IMAGE_VERSION
value: ${OPERATOR_IMAGE_VERSION}
- name: POD_NAME
valueFrom:
fieldRef:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@ const (
envAzureDiskDriverOperatorImage = "AZURE_DISK_DRIVER_OPERATOR_IMAGE"
envAzureDiskDriverImage = "AZURE_DISK_DRIVER_IMAGE"
envCCMOperatorImage = "CLUSTER_CLOUD_CONTROLLER_MANAGER_OPERATOR_IMAGE"
envOperatorImageVersion = "OPERATOR_IMAGE_VERSION"
)

func GetAzureDiskCSIOperatorConfig() CSIOperatorConfig {
pairs := []string{
"${OPERATOR_IMAGE}", os.Getenv(envAzureDiskDriverOperatorImage),
"${DRIVER_IMAGE}", os.Getenv(envAzureDiskDriverImage),
"${CLUSTER_CLOUD_CONTROLLER_MANAGER_OPERATOR_IMAGE}", os.Getenv(envCCMOperatorImage),
"${OPERATOR_IMAGE_VERSION}", os.Getenv(envOperatorImageVersion),
}

return CSIOperatorConfig{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ func GetAzureFileCSIOperatorConfig() CSIOperatorConfig {
"${OPERATOR_IMAGE}", os.Getenv(envAzureFileDriverOperatorImage),
"${DRIVER_IMAGE}", os.Getenv(envAzureFileDriverImage),
"${CLUSTER_CLOUD_CONTROLLER_MANAGER_OPERATOR_IMAGE}", os.Getenv(envCCMOperatorImage),
"${OPERATOR_IMAGE_VERSION}", os.Getenv(envOperatorImageVersion),
}

return CSIOperatorConfig{
Expand Down