-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use Key Vault secret provider for TLS certificates (#292)
- Loading branch information
Showing
16 changed files
with
158 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
controller: | ||
podLabels: | ||
azure.workload.identity/use: "true" | ||
extraVolumes: | ||
- name: secrets-store-inline | ||
csi: | ||
driver: secrets-store.csi.k8s.io | ||
readOnly: true | ||
volumeAttributes: | ||
secretProviderClass: "keyvault" | ||
extraVolumeMounts: | ||
- name: secrets-store-inline | ||
mountPath: "/mnt/secrets-store" | ||
readOnly: true | ||
extraArgs: | ||
default-ssl-certificate: pc/planetarycomputer-test-certificate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -103,24 +103,24 @@ pcingress: | |
cert: | ||
secretName: "pctasks-tls-secret" | ||
|
||
certIssuer: | ||
enabled: true | ||
privateKeySecretRef: "{{ tf.cluster_cert_issuer }}" | ||
server: "{{ tf.cluster_cert_server }}" | ||
issuerEmail: "[email protected]" | ||
secretName: "pctasks-tls-secret" | ||
|
||
ingress: | ||
enabled: true | ||
tlsHost: "{{ tf.cloudapp_hostname }}" | ||
tlsHost: "planetarycomputer-test.microsoft.com" | ||
hosts: | ||
- "{{ tf.cloudapp_hostname }}" | ||
- "planetarycomputer-test.microsoft.com" | ||
- "{{ tf.api_management_name }}.azure-api.net" | ||
annotations: | ||
kubernetes.io/ingress.class: nginx | ||
cert-manager.io/cluster-issuer: "{{ tf.cluster_cert_issuer }}-pcingress" | ||
nginx.ingress.kubernetes.io/rewrite-target: /$2 | ||
nginx.ingress.kubernetes.io/use-regex: "true" | ||
nginx.ingress.kubernetes.io/proxy-buffer-size: "16k" | ||
nginx.ingress.kubernetes.io/proxy-buffers-number: "8" | ||
|
||
secretProvider: | ||
create: true | ||
namespace: "pc" | ||
providerName: "keyvault" | ||
userAssignedIdentityID: "{{ env.SECRET_PROVIDER_MANAGED_IDENTITY_ID }}" | ||
tenantId: "{{ env.AZURE_TENANT }}" | ||
keyvaultName: "{{ env.KEYVAULT_NAME }}" | ||
keyvaultCertificateName: "{{ env.SECRET_PROVIDER_KEYVAULT_SECRET }}" | ||
kubernetesCertificateSecretName: "{{ env.SECRET_PROVIDER_KEYVAULT_SECRET }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 0 additions & 20 deletions
20
deployment/helm/pc-tasks-ingress/templates/cluster_issuer.yaml
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
deployment/helm/pc-tasks-ingress/templates/secret-provider.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{{- if .Values.secretProvider.create -}} | ||
apiVersion: secrets-store.csi.x-k8s.io/v1 | ||
kind: SecretProviderClass | ||
metadata: | ||
name: {{ .Values.secretProvider.providerName }} | ||
namespace: {{ .Values.secretProvider.namespace }} | ||
spec: | ||
provider: azure | ||
secretObjects: | ||
- secretName: {{ .Values.secretProvider.kubernetesCertificateSecretName }} | ||
type: kubernetes.io/tls | ||
data: | ||
- objectName: {{ .Values.secretProvider.keyvaultCertificateName }} | ||
key: tls.crt | ||
- objectName: {{ .Values.secretProvider.keyvaultCertificateName }} | ||
key: tls.key | ||
parameters: | ||
usePodIdentity: "false" | ||
clientID: "{{ .Values.secretProvider.userAssignedIdentityID }}" | ||
keyvaultName: "{{ .Values.secretProvider.keyvaultName }}" | ||
tenantId: "{{ .Values.secretProvider.tenantId }}" | ||
cloudName: "" | ||
objects: | | ||
array: | ||
- | | ||
objectName: {{ .Values.secretProvider.keyvaultCertificateName }} | ||
objectType: secret | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters