Skip to content

Commit

Permalink
Configurable serviceLinks + Update from upstream (#350)
Browse files Browse the repository at this point in the history
* Update from upstream

* Adapt values.yaml with changes from upstream

* Update Changelog

* Fix headlines in changelog
  • Loading branch information
ubergesundheit committed Aug 24, 2023
1 parent 9690a37 commit 622615c
Show file tree
Hide file tree
Showing 8 changed files with 111 additions and 19 deletions.
11 changes: 9 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,18 @@ and this project's packages adheres to [Semantic Versioning](http://semver.org/s

## [Unreleased]

⚠️ Attention: Major release [3.0.0](#300---2023-07-26) contains breaking changes in user values! Please make yourself familiar with its changelog! ⚠️

### Changed

- Make `spec.enableServiceLinks` field configurable for controller, cainjector and webhook Deployments and startupapicheck Job. ([#350](https://github.com/giantswarm/cert-manager-app/pull/350))
- Update chart from upstream. Relevant upstream PRs: [#6241](https://github.com/cert-manager/cert-manager/pull/6241), [#6156](https://github.com/cert-manager/cert-manager/pull/6156), [#6292](https://github.com/cert-manager/cert-manager/pull/6292), [#5337](https://github.com/cert-manager/cert-manager/pull/5337). ([#350](https://github.com/giantswarm/cert-manager-app/pull/350))

## [3.1.0] - 2023-07-27

⚠️ Attention: Major release [3.0.0](#300---2023-07-26) contains breaking changes in user values! Please make yourself familiar with its changelog! ⚠️

## Changed
### Changed

- Update container image versions to use [v1.12.3](https://github.com/cert-manager/cert-manager/releases/tag/v1.12.3) ([#344](https://github.com/giantswarm/cert-manager-app/pull/344))
- Fix PodDisruptionBudget templates for simultaneous minAvailable and maxUnavailable null values. ([#344](https://github.com/giantswarm/cert-manager-app/pull/344))
Expand All @@ -21,7 +28,7 @@ and this project's packages adheres to [Semantic Versioning](http://semver.org/s

⚠️ Attention: Major release [3.0.0](#300---2023-07-26) contains breaking changes in user values! Please make yourself familiar with its changelog! ⚠️

## Changed
### Changed

- Explicitly set `ciliumNetworkPolicy.enabled` to `false` in default values. ([#341](https://github.com/giantswarm/cert-manager-app/pull/341))

Expand Down
2 changes: 1 addition & 1 deletion helm/cert-manager/templates/cainjector-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ spec:
{{- if hasKey .Values.cainjector "automountServiceAccountToken" }}
automountServiceAccountToken: {{ .Values.cainjector.automountServiceAccountToken }}
{{- end }}
enableServiceLinks: false
enableServiceLinks: {{ .Values.cainjector.enableServiceLinks }}
{{- with .Values.global.priorityClassName }}
priorityClassName: {{ . | quote }}
{{- end }}
Expand Down
23 changes: 20 additions & 3 deletions helm/cert-manager/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,24 @@ spec:
{{- if hasKey .Values "automountServiceAccountToken" }}
automountServiceAccountToken: {{ .Values.automountServiceAccountToken }}
{{- end }}
enableServiceLinks: false
enableServiceLinks: {{ .Values.enableServiceLinks }}
{{- with .Values.global.priorityClassName }}
priorityClassName: {{ . | quote }}
{{- end }}
{{- with .Values.securityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.volumes }}
{{- if or .Values.volumes .Values.config}}
volumes:
{{- if .Values.config }}
- name: config
configMap:
name: {{ include "cert-manager.fullname" . }}
{{- end }}
{{ with .Values.volumes }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
containers:
- name: {{ .Chart.Name }}-controller
Expand All @@ -74,6 +81,10 @@ spec:
{{- if .Values.global.logLevel }}
- --v={{ .Values.global.logLevel }}
{{- end }}
{{- if .Values.config }}
- --config=/var/cert-manager/config/config.yaml
{{- end }}
{{- $config := default .Values.config "" }}
{{- if .Values.clusterResourceNamespace }}
- --cluster-resource-namespace={{ .Values.clusterResourceNamespace }}
{{- else }}
Expand Down Expand Up @@ -134,9 +145,15 @@ spec:
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.volumeMounts }}
{{- if or .Values.config .Values.volumeMounts }}
volumeMounts:
{{- if .Values.config}}
- name: config
mountPath: /var/cert-manager/config
{{- end }}
{{- with .Values.volumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- end }}
env:
- name: POD_NAMESPACE
Expand Down
21 changes: 21 additions & 0 deletions helm/cert-manager/templates/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,26 @@ subjects:
namespace: {{ include "cert-manager.namespace" . }}
kind: ServiceAccount

{{- if .Values.global.rbac.aggregateClusterRoles }}
---

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ template "cert-manager.fullname" . }}-cluster-view
labels:
app: {{ include "cert-manager.name" . }}
app.kubernetes.io/name: {{ include "cert-manager.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: "controller"
{{- include "labels" . | nindent 4 }}
rbac.authorization.k8s.io/aggregate-to-cluster-reader: "true"
rules:
- apiGroups: ["cert-manager.io"]
resources: ["clusterissuers"]
verbs: ["get", "list", "watch"]

{{- end }}
---

apiVersion: rbac.authorization.k8s.io/v1
Expand All @@ -414,6 +434,7 @@ metadata:
rbac.authorization.k8s.io/aggregate-to-view: "true"
rbac.authorization.k8s.io/aggregate-to-edit: "true"
rbac.authorization.k8s.io/aggregate-to-admin: "true"
rbac.authorization.k8s.io/aggregate-to-cluster-reader: "true"
{{- end }}
rules:
- apiGroups: ["cert-manager.io"]
Expand Down
2 changes: 1 addition & 1 deletion helm/cert-manager/templates/startupapicheck-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ spec:
{{- if hasKey .Values.startupapicheck "automountServiceAccountToken" }}
automountServiceAccountToken: {{ .Values.startupapicheck.automountServiceAccountToken }}
{{- end }}
enableServiceLinks: false
enableServiceLinks: {{ .Values.startupapicheck.enableServiceLinks }}
{{- with .Values.global.priorityClassName }}
priorityClassName: {{ . | quote }}
{{- end }}
Expand Down
5 changes: 4 additions & 1 deletion helm/cert-manager/templates/webhook-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ spec:
{{- if hasKey .Values.webhook "automountServiceAccountToken" }}
automountServiceAccountToken: {{ .Values.webhook.automountServiceAccountToken }}
{{- end }}
enableServiceLinks: false
enableServiceLinks: {{ .Values.webhook.enableServiceLinks }}
{{- with .Values.global.priorityClassName }}
priorityClassName: {{ . | quote }}
{{- end }}
Expand All @@ -55,6 +55,9 @@ spec:
{{- if .Values.webhook.hostNetwork }}
hostNetwork: true
{{- end }}
{{- if .Values.webhook.hostNetwork }}
dnsPolicy: ClusterFirstWithHostNet
{{- end }}
containers:
- name: {{ .Chart.Name }}-webhook
{{- with .Values.webhook.image }}
Expand Down
62 changes: 53 additions & 9 deletions helm/cert-manager/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ strategy: {}
podDisruptionBudget:
enabled: false

minAvailable: 1
# maxUnavailable: 1

# minAvailable and maxUnavailable can either be set to an integer (e.g. 1)
# or a percentage value (e.g. 25%)
# if neither minAvailable or maxUnavailable is set, we default to `minAvailable: 1`
minAvailable: 1
# maxUnavailable: 1

# Comma separated list of feature gates that should be enabled on the
# controller pod.
Expand Down Expand Up @@ -117,6 +117,29 @@ serviceAccount:
# When this flag is enabled, secrets will be automatically removed when the certificate resource is deleted
enableCertificateOwnerRef: false

# Used to configure options for the controller pod.
# This allows setting options that'd usually be provided via flags.
# An APIVersion and Kind must be specified in your values.yaml file.
# Flags will override options that are set here.
config:
# apiVersion: controller.config.cert-manager.io/v1alpha1
# kind: ControllerConfiguration
# logging:
# verbosity: 2
# format: text
# leaderElectionConfig:
# namespace: kube-system
# kubernetesAPIQPS: 9000
# kubernetesAPIBurst: 9000
# numberOfConcurrentWorkers: 200
# featureGates:
# additionalCertificateOutputFormats: true
# experimentalCertificateSigningRequestControllers: true
# experimentalGatewayAPISupport: true
# serverSideApply: true
# literalCertificateSubject: true
# useCertificateRequestBasicConstraints: true

# Setting Nameservers for DNS01 Self Check
# See: https://cert-manager.io/docs/configuration/acme/dns01/#setting-nameservers-for-dns01-self-check

Expand Down Expand Up @@ -214,6 +237,7 @@ prometheus:
labels: {}
annotations: {}
honorLabels: false
endpointAdditionalProperties: {}

# Use these variables to configure the HTTP_PROXY environment variables
# http_proxy: "http://proxy:8080"
Expand Down Expand Up @@ -274,6 +298,11 @@ livenessProbe:
successThreshold: 1
failureThreshold: 8

# enableServiceLinks indicates whether information about services should be
# injected into pod's environment variables, matching the syntax of Docker
# links.
enableServiceLinks: false

webhook:
replicaCount: 2
timeoutSeconds: 10
Expand Down Expand Up @@ -311,11 +340,11 @@ webhook:
podDisruptionBudget:
enabled: true

minAvailable: "50%"
# maxUnavailable: 1

# minAvailable and maxUnavailable can either be set to an integer (e.g. 1)
# or a percentage value (e.g. 25%)
# if neither minAvailable or maxUnavailable is set, we default to `minAvailable: 1`
minAvailable: "50%"
# maxUnavailable: 1

# Container Security Context to be set on the webhook component container
# ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
Expand Down Expand Up @@ -494,6 +523,11 @@ webhook:
volumes: []
volumeMounts: []

# enableServiceLinks indicates whether information about services should be
# injected into pod's environment variables, matching the syntax of Docker
# links.
enableServiceLinks: false

cainjector:
enabled: true
replicaCount: 1
Expand All @@ -514,11 +548,11 @@ cainjector:
podDisruptionBudget:
enabled: false

minAvailable: 1
# maxUnavailable: 1

# minAvailable and maxUnavailable can either be set to an integer (e.g. 1)
# or a percentage value (e.g. 25%)
# if neither minAvailable or maxUnavailable is set, we default to `minAvailable: 1`
minAvailable: 1
# maxUnavailable: 1

# Container Security Context to be set on the cainjector component container
# ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
Expand Down Expand Up @@ -597,6 +631,11 @@ cainjector:
volumes: []
volumeMounts: []

# enableServiceLinks indicates whether information about services should be
# injected into pod's environment variables, matching the syntax of Docker
# links.
enableServiceLinks: false

acmesolver:
image:
# You can manage a registry with
Expand Down Expand Up @@ -721,6 +760,11 @@ startupapicheck:
volumes: []
volumeMounts: []

# enableServiceLinks indicates whether information about services should be
# injected into pod's environment variables, matching the syntax of Docker
# links.
enableServiceLinks: false

ciliumNetworkPolicy:
enabled: false

Expand Down
4 changes: 2 additions & 2 deletions vendir.lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: vendir.k14s.io/v1alpha1
directories:
- contents:
- git:
commitTitle: Update CRDs from upstream
sha: 9378b2e56460c17addaf07f187312f1097e8a95a
commitTitle: Merge branch 'upstream-master'
sha: afc706b771124c200f94264417956529a26c21a3
path: cert-manager
path: vendor
- contents:
Expand Down

0 comments on commit 622615c

Please sign in to comment.