diff --git a/charts/port-agent/Chart.yaml b/charts/port-agent/Chart.yaml index e90339d..46f6c13 100644 --- a/charts/port-agent/Chart.yaml +++ b/charts/port-agent/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: port-agent description: A Helm chart for Port Agent type: application -version: 0.7.11 +version: 0.7.12 appVersion: "v0.7.0" home: https://getport.io/ sources: diff --git a/charts/port-agent/README.md b/charts/port-agent/README.md index 1583dc0..bf09dcf 100644 --- a/charts/port-agent/README.md +++ b/charts/port-agent/README.md @@ -73,8 +73,13 @@ The following table lists the configuration parameters of the `port-agent` chart | `nodeSelector` | NodeSelector applied to the pod | `{}` | | `tolerations` | Tolerations applied to the pod | `[]` | | `affinity` | Affinity applied to the pod | `{}` | -| `selfSignedCertificate.enabled` | Enable self-signed certificate trust for the integration. | `false` | -| `selfSignedCertificate.certificate` | The value of the self-signed certificate (only when `selfSignedCertificate.enabled=true`) | `""` | +| `selfSignedCertificate` | Self Signed certificate for the agent | `{}` | +| `selfSignedCertificate.enabled` | Enable self-signed certificate trust for the agent | `false` | +| `selfSignedCertificate.certificate` | The value of the self-signed certificate (only when `selfSignedCertificate.enabled=true`) | `""` | +| `selfSignedCertificate.secret` | Secret with self-signed certificate | `{}` | +| `selfSignedCertificate.secret.useExistingSecret` | Enable this if you wish to use your own secret with the self-signed certificate | `false` | +| `selfSignedCertificate.secret.key` | The key in the existing self-signed certificate secret | `crt` | +| `selfSignedCertificate.secret.name` | The name of an existing secret containing the self-signed certificate | `""` | To override values in `helm install`, use either the `--set` flag or the `--set-file` flag to set individual values from a file. diff --git a/charts/port-agent/templates/certificate_secret.yaml b/charts/port-agent/templates/certificate_secret.yaml index e15cf65..13cda3e 100644 --- a/charts/port-agent/templates/certificate_secret.yaml +++ b/charts/port-agent/templates/certificate_secret.yaml @@ -1,4 +1,4 @@ -{{- if .Values.selfSignedCertificate.enabled }} +{{- if and .Values.selfSignedCertificate.enabled (not .Values.selfSignedCertificate.secret.useExistingSecret) }} apiVersion: v1 kind: Secret metadata: diff --git a/charts/port-agent/templates/deployment.yaml b/charts/port-agent/templates/deployment.yaml index 6e18f92..d074099 100644 --- a/charts/port-agent/templates/deployment.yaml +++ b/charts/port-agent/templates/deployment.yaml @@ -73,7 +73,16 @@ spec: configMap: name: {{ include "port-agent.fullname" . }} {{- end }} - {{- if .Values.selfSignedCertificate.enabled }} + {{- if and .Values.selfSignedCertificate.enabled .Values.selfSignedCertificate.secret.useExistingSecret }} + - name: certificates + projected: + sources: + - secret: + name: {{ .Values.selfSignedCertificate.secret.name }} + items: + - key: {{ .Values.selfSignedCertificate.secret.key }} + path: cert.crt + {{- else if .Values.selfSignedCertificate.enabled }} - name: certificates projected: sources: diff --git a/charts/port-agent/values.yaml b/charts/port-agent/values.yaml index fd3ab97..0adadec 100644 --- a/charts/port-agent/values.yaml +++ b/charts/port-agent/values.yaml @@ -62,3 +62,7 @@ affinity: {} selfSignedCertificate: enabled: false certificate: "" + secret: + name: "" + key: crt + useExistingSecret: false