Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ct.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ check-version-increment: false
debug: false
remote: origin
target-branch: main
upgrade: true
upgrade: false
validate-chart-schema: true
validate-maintainers: false
validate-yaml: true
2 changes: 1 addition & 1 deletion charts/dwpk/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ sources:
- https://github.com/devops-ia/helm-dwpk
- https://github.com/devops-ia/dwpk
version: 0.1.0
appVersion: "1.0.0"
appVersion: 1.0.2
home: https://github.com/devops-ia/dwpk
keywords:
- kubernetes
Expand Down
2 changes: 1 addition & 1 deletion charts/dwpk/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# dwpk

![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.0.0](https://img.shields.io/badge/AppVersion-1.0.0-informational?style=flat-square)
![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.0.2](https://img.shields.io/badge/AppVersion-1.0.2-informational?style=flat-square)

Development Workspace Platform for Kubernetes: a Go operator, an SSH gateway, and a marketplace web UI, deployed together by this chart.

Expand Down
6 changes: 6 additions & 0 deletions charts/dwpk/ci/ct-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,9 @@ prometheus:
# previous release, so the next install fails on ownership metadata.
crd:
keep: false

# CI only: leader election needs a Lease in a hardcoded namespace, and ct installs
# into random ones. A single replica does not need it.
manager:
replicas: 1
args: []
23 changes: 23 additions & 0 deletions charts/dwpk/templates/cert-manager/serving-cert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,27 @@ spec:
kind: Issuer
name: {{ include "dwpk.resourceName" (dict "suffix" "selfsigned-issuer" "context" $) }}
secretName: webhook-server-cert
{{- else }}
{{- /*
The manager always starts its webhook server and exits without a serving
cert, so without cert-manager the chart ships a self-signed one.
ponytail: regenerated on every upgrade and no caBundle is injected into the
webhook configurations; use cert-manager when webhook.enabled is true.
*/}}
{{- $svc := include "dwpk.resourceName" (dict "suffix" "webhook-service" "context" $) }}
{{- $cert := genSelfSignedCert (printf "%s.%s.svc" $svc .Release.Namespace) nil (list (printf "%s.%s.svc" $svc .Release.Namespace) (printf "%s.%s.svc.cluster.local" $svc .Release.Namespace)) 3650 }}
apiVersion: v1
kind: Secret
type: kubernetes.io/tls
metadata:
labels:
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/name: {{ include "dwpk.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/instance: {{ .Release.Name }}
name: webhook-server-cert
namespace: {{ .Release.Namespace }}
data:
tls.crt: {{ $cert.Cert | b64enc }}
tls.key: {{ $cert.Key | b64enc }}
{{- end }}
6 changes: 0 additions & 6 deletions charts/dwpk/templates/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,7 @@ spec:
{{- range .Values.manager.args }}
- {{ . }}
{{- end }}
{{- if .Values.certManager.enabled }}
- --webhook-cert-path=/tmp/k8s-webhook-server/serving-certs
{{- end }}
command:
{{- with .Values.manager.command }}
{{- toYaml . | nindent 8 }}
Expand Down Expand Up @@ -181,11 +179,9 @@ spec:
{{- if .Values.manager.extraVolumeMounts }}
{{- toYaml .Values.manager.extraVolumeMounts | nindent 10 }}
{{- end }}
{{- if .Values.certManager.enabled }}
- mountPath: /tmp/k8s-webhook-server/serving-certs
name: webhook-certs
readOnly: true
{{- end }}
securityContext:
{{- if .Values.manager.podSecurityContext }}
{{- toYaml .Values.manager.podSecurityContext | nindent 8 }}
Expand All @@ -200,9 +196,7 @@ spec:
{{- if .Values.manager.extraVolumes }}
{{- toYaml .Values.manager.extraVolumes | nindent 8 }}
{{- end }}
{{- if .Values.certManager.enabled }}
- name: webhook-certs
secret:
secretName: webhook-server-cert
{{- end }}
{{- end }}
Loading