Skip to content

Commit df3bc43

Browse files
authored
Merge pull request #3 from iits-consulting/security-context
- add securityContext (pod and container) settings for deployment - fix docker image repo address
2 parents 8f5ad4f + 870ce0a commit df3bc43

File tree

4 files changed

+29
-3
lines changed

4 files changed

+29
-3
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ GO ?= $(shell which go)
22
OS ?= $(shell $(GO) env GOOS)
33
ARCH ?= $(shell $(GO) env GOARCH)
44

5-
IMAGE_NAME := "iits-consulting/cert-manager-webhook-opentelekomcloud"
5+
IMAGE_NAME := "ghcr.io/iits-consulting/cert-manager-webhook-opentelekomcloud"
66
IMAGE_TAG ?= "v0.1.5"
77

88
OUT := $(shell pwd)/_out

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ apiVersion: v1
22
appVersion: "v0.1.5"
33
description: ACME DNS01 solver webhook for Open Telekom Cloud DNS
44
name: cert-manager-webhook-opentelekomcloud
5-
version: 0.1.5
5+
version: 0.1.5-security-context

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ spec:
2121
release: {{ .Release.Name }}
2222
spec:
2323
serviceAccountName: {{ include "cert-manager-webhook-opentelekomcloud.fullname" . }}
24+
{{- with .Values.podSecurityContext }}
25+
securityContext:
26+
{{ toYaml . | indent 8 }}
27+
{{- end }}
2428
containers:
2529
- name: {{ .Chart.Name }}
2630
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
@@ -54,6 +58,10 @@ spec:
5458
- name: certs
5559
mountPath: /tls
5660
readOnly: true
61+
{{- with .Values.containerSecurityContext }}
62+
securityContext:
63+
{{ toYaml . | indent 12 }}
64+
{{- end }}
5765
resources:
5866
{{ toYaml .Values.resources | indent 12 }}
5967
volumes:

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

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ certManager:
1515
serviceAccountName: cert-manager
1616

1717
image:
18-
repository: iits-consulting/cert-manager-webhook-opentelekomcloud
18+
repository: ghcr.io/iits-consulting/cert-manager-webhook-opentelekomcloud
1919
tag: v0.1.5
2020
pullPolicy: IfNotPresent
2121

@@ -24,6 +24,24 @@ replicaCount: 1
2424
nameOverride: ""
2525
fullnameOverride: ""
2626

27+
podSecurityContext:
28+
runAsNonRoot: false
29+
seccompProfile:
30+
type: RuntimeDefault
31+
32+
containerSecurityContext:
33+
allowPrivilegeEscalation: false
34+
capabilities:
35+
add:
36+
- NET_BIND_SERVICE
37+
drop:
38+
- ALL
39+
privileged: false
40+
readOnlyRootFilesystem: true
41+
runAsNonRoot: false
42+
seccompProfile:
43+
type: RuntimeDefault
44+
2745
service:
2846
type: ClusterIP
2947
port: 443

0 commit comments

Comments
 (0)