Skip to content

Commit 0343550

Browse files
authored
Merge pull request #4 from rackerlabs/chart-drop-priv
chart: drop security permissions and don't use privileged port
2 parents e1e2f1c + 408ed01 commit 0343550

File tree

5 files changed

+27
-3
lines changed

5 files changed

+27
-3
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,4 +81,4 @@ jobs:
8181
8282
- name: Run chart-testing (lint)
8383
if: steps.list-changed.outputs.changed == 'true'
84-
run: ct lint --target-branch ${{ github.event.repository.default_branch }}
84+
run: ct lint --check-version-increment=false --target-branch ${{ github.event.repository.default_branch }}

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,5 @@ jobs:
5353
-e "s/^version:.*/version: ${PKG_VER}/" \
5454
-i charts/cert-manager-webhook-rackspace/Chart.yaml
5555
helm package -u -d . charts/cert-manager-webhook-rackspace
56-
helm push cert-manager-webhook-rackspace-${PKG_VER}.tgz "oci://ghcr.io/$GITHUB_REPOSITORY"
56+
helm push cert-manager-webhook-rackspace-${PKG_VER}.tgz "oci://ghcr.io/$GITHUB_REPOSITORY_OWNER/charts"
5757

charts/cert-manager-webhook-rackspace/Chart.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@ appVersion: "0.0.0"
33
description: Rackspace Cloud DNS webhook for cert-manager support
44
name: cert-manager-webhook-rackspace
55
version: 0.1.0
6+
maintainers:
7+
- name: cardoe
8+

charts/cert-manager-webhook-rackspace/templates/deployment.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,13 @@ spec:
2828
args:
2929
- --tls-cert-file=/tls/tls.crt
3030
- --tls-private-key-file=/tls/tls.key
31+
- --secure-port=8443
3132
env:
3233
- name: GROUP_NAME
3334
value: {{ .Values.groupName | quote }}
3435
ports:
3536
- name: https
36-
containerPort: 443
37+
containerPort: 8443
3738
protocol: TCP
3839
livenessProbe:
3940
httpGet:
@@ -45,6 +46,10 @@ spec:
4546
scheme: HTTPS
4647
path: /healthz
4748
port: https
49+
{{- with .Values.securityContext }}
50+
securityContext:
51+
{{ toYaml . | indent 12 }}
52+
{{- end }}
4853
volumeMounts:
4954
- name: certs
5055
mountPath: /tls
@@ -55,6 +60,10 @@ spec:
5560
- name: certs
5661
secret:
5762
secretName: {{ include "cert-manager-webhook-rackspace.servingCertificate" . }}
63+
{{- with .Values.podSecurityContext }}
64+
securityContext:
65+
{{ toYaml . | indent 8 }}
66+
{{- end }}
5867
{{- with .Values.nodeSelector }}
5968
nodeSelector:
6069
{{ toYaml . | indent 8 }}

charts/cert-manager-webhook-rackspace/values.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ certManager:
1414

1515
image:
1616
repository: ghcr.io/rackerlabs/cert-manager-webhook-rackspace
17+
# Overrides the image tag whose default is {{ printf "v%s" .Chart.AppVersion }}
18+
tag: ""
1719
pullPolicy: IfNotPresent
1820

1921
nameOverride: ""
@@ -40,3 +42,13 @@ nodeSelector: {}
4042
tolerations: []
4143

4244
affinity: {}
45+
46+
securityContext:
47+
allowPrivilegeEscalation: false
48+
capabilities:
49+
drop: ["ALL"]
50+
51+
podSecurityContext:
52+
runAsGroup: 1000
53+
runAsUser: 1000
54+
runAsNonRoot: true

0 commit comments

Comments
 (0)