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

CNTRLPLANE-112: Update managed Azure HCP cloud network config #2647

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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
14 changes: 5 additions & 9 deletions bindata/cloud-network-config-controller/managed/controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -188,13 +188,9 @@ spec:
- name: "NO_PROXY"
value: "{{ .NO_PROXY}}"
{{ end }}
{{- if not (eq .AzureManagedClientID "")}}
- name: "ARO_HCP_MI_CLIENT_ID"
value: "{{ .AzureManagedClientID }}"
- name: "ARO_HCP_TENANT_ID"
value: "{{ .AzureManagedTenantID }}"
- name: "ARO_HCP_CLIENT_CERTIFICATE_PATH"
value: "{{ .AzureManagedCertPath}}"
{{- if not (eq .AzureManagedSecretProviderClass "")}}
- name: "ARO_HCP_CLIENT_CREDENTIALS_PATH"
value: "{{ .AzureManagedCredsPath}}"
{{ end }}
resources:
requests:
Expand All @@ -214,7 +210,7 @@ spec:
- name: cloud-token
mountPath: /var/run/secrets/openshift/serviceaccount
readOnly: true
{{- if not (eq .AzureManagedClientID "")}}
{{- if not (eq .AzureManagedSecretProviderClass "")}}
- name: cncc-cert
mountPath: {{.AzureManagedCertDirectory}}
readOnly: true
Expand Down Expand Up @@ -260,7 +256,7 @@ spec:
- name: kube-cloud-config
configMap:
name: cloud-network-config-controller-kube-cloud-config
{{- if not (eq .AzureManagedClientID "")}}
{{- if not (eq .AzureManagedSecretProviderClass "")}}
- name: cncc-cert
csi:
driver: secrets-store.csi.k8s.io
Expand Down
4 changes: 1 addition & 3 deletions pkg/network/cloud_network.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,8 @@ func renderCloudNetworkConfigController(conf *operv1.NetworkSpec, bootstrapResul
data.Data["HTTP_PROXY"] = os.Getenv("MGMT_HTTP_PROXY")
data.Data["HTTPS_PROXY"] = os.Getenv("MGMT_HTTPS_PROXY")
data.Data["NO_PROXY"] = os.Getenv("MGMT_NO_PROXY")
data.Data["AzureManagedClientID"] = os.Getenv("ARO_HCP_MI_CLIENT_ID")
data.Data["AzureManagedTenantID"] = os.Getenv("ARO_HCP_TENANT_ID")
data.Data["AzureManagedCertDirectory"] = azureCertPath
data.Data["AzureManagedCertPath"] = filepath.Join(azureCertPath, os.Getenv("ARO_HCP_CLIENT_CERTIFICATE_NAME"))
data.Data["AzureManagedCredsPath"] = filepath.Join(azureCertPath, os.Getenv("MANAGED_AZURE_HCP_CREDENTIALS_FILE_PATH"))
data.Data["AzureManagedSecretProviderClass"] = os.Getenv("ARO_HCP_SECRET_PROVIDER_CLASS")
caOverride.ObjectMeta = metav1.ObjectMeta{
Namespace: hcpCfg.Namespace,
Expand Down