Skip to content

Commit 1c102ae

Browse files
Merge pull request #107 from port-labs/port-agent-add-self-signed-cert-secret
added self signed certificate support for port-agent
2 parents e81355d + 31ae33b commit 1c102ae

File tree

5 files changed

+23
-5
lines changed

5 files changed

+23
-5
lines changed

charts/port-agent/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: port-agent
33
description: A Helm chart for Port Agent
44
type: application
5-
version: 0.7.11
5+
version: 0.7.12
66
appVersion: "v0.7.0"
77
home: https://getport.io/
88
sources:

charts/port-agent/README.md

+7-2
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,13 @@ The following table lists the configuration parameters of the `port-agent` chart
7373
| `nodeSelector` | NodeSelector applied to the pod | `{}` |
7474
| `tolerations` | Tolerations applied to the pod | `[]` |
7575
| `affinity` | Affinity applied to the pod | `{}` |
76-
| `selfSignedCertificate.enabled` | Enable self-signed certificate trust for the integration. | `false` |
77-
| `selfSignedCertificate.certificate` | The value of the self-signed certificate (only when `selfSignedCertificate.enabled=true`) | `""` |
76+
| `selfSignedCertificate` | Self Signed certificate for the agent | `{}` |
77+
| `selfSignedCertificate.enabled` | Enable self-signed certificate trust for the agent | `false` |
78+
| `selfSignedCertificate.certificate` | The value of the self-signed certificate (only when `selfSignedCertificate.enabled=true`) | `""` |
79+
| `selfSignedCertificate.secret` | Secret with self-signed certificate | `{}` |
80+
| `selfSignedCertificate.secret.useExistingSecret` | Enable this if you wish to use your own secret with the self-signed certificate | `false` |
81+
| `selfSignedCertificate.secret.key` | The key in the existing self-signed certificate secret | `crt` |
82+
| `selfSignedCertificate.secret.name` | The name of an existing secret containing the self-signed certificate | `""` |
7883

7984
To override values in `helm install`, use either the `--set` flag or the `--set-file` flag to set individual values from
8085
a file.

charts/port-agent/templates/certificate_secret.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- if .Values.selfSignedCertificate.enabled }}
1+
{{- if and .Values.selfSignedCertificate.enabled (not .Values.selfSignedCertificate.secret.useExistingSecret) }}
22
apiVersion: v1
33
kind: Secret
44
metadata:

charts/port-agent/templates/deployment.yaml

+10-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,16 @@ spec:
7373
configMap:
7474
name: {{ include "port-agent.fullname" . }}
7575
{{- end }}
76-
{{- if .Values.selfSignedCertificate.enabled }}
76+
{{- if and .Values.selfSignedCertificate.enabled .Values.selfSignedCertificate.secret.useExistingSecret }}
77+
- name: certificates
78+
projected:
79+
sources:
80+
- secret:
81+
name: {{ .Values.selfSignedCertificate.secret.name }}
82+
items:
83+
- key: {{ .Values.selfSignedCertificate.secret.key }}
84+
path: cert.crt
85+
{{- else if .Values.selfSignedCertificate.enabled }}
7786
- name: certificates
7887
projected:
7988
sources:

charts/port-agent/values.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,7 @@ affinity: {}
6262
selfSignedCertificate:
6363
enabled: false
6464
certificate: ""
65+
secret:
66+
name: ""
67+
key: crt
68+
useExistingSecret: false

0 commit comments

Comments
 (0)