Skip to content

Commit

Permalink
updates for rancher 2.8.10 (#244)
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Martin <[email protected]>
  • Loading branch information
amartin120 authored Nov 19, 2024
1 parent b972074 commit 7badbb9
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 35 deletions.
6 changes: 3 additions & 3 deletions charts/rancher/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
apiVersion: v2
name: rancher
description: Install Rancher Server to manage Kubernetes clusters across providers
version: 2.7.18
appVersion: v2.7.18
kubeVersion: < 1.28.0-0
version: 2.8.10
appVersion: v2.8.10
kubeVersion: < 1.29.0-0
home: https://rancher.com
icon: https://github.com/rancher/ui/blob/master/public/assets/images/logos/welcome-cow.svg
keywords:
Expand Down
15 changes: 14 additions & 1 deletion charts/rancher/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
{{- printf "%s-%s" .Chart.Name .Chart.Version | trunc 63 | trimSuffix "-" -}}
{{- end -}}

# Render Values in configurationSnippet
{{/*
Render Values in configurationSnippet
*/}}
{{- define "configurationSnippet" -}}
{{- tpl (.Values.ingress.configurationSnippet) . | nindent 6 -}}
{{- end -}}
Expand Down Expand Up @@ -98,4 +100,15 @@ true
{{- else -}}
{{- fail "Invalid value for .Values.global.cattle.psp.enabled - must be a bool of true, false, or \"\"" -}}
{{- end -}}
{{- end -}}

{{/*
Select correct auditLog image
*/}}
{{- define "auditLog_image" -}}
{{- if .Values.busyboxImage }}
{{- .Values.busyboxImage}}
{{- else }}
{{- .Values.auditLog.image.repository -}}:{{- .Values.auditLog.image.tag -}}
{{- end }}
{{- end -}}
5 changes: 5 additions & 0 deletions charts/rancher/templates/configMap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,9 @@ data:
rancher-webhook: {{ .Values.webhook | quote }}
{{- else if .Values.webhook }}
rancher-webhook: {{ toYaml .Values.webhook | quote }}
{{- end }}
{{- if and .Values.fleet (kindIs "string" .Values.fleet) }}
fleet: {{ .Values.fleet | quote }}
{{- else if .Values.fleet }}
fleet: {{ toYaml .Values.fleet | quote }}
{{- end }}
41 changes: 20 additions & 21 deletions charts/rancher/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -161,26 +161,33 @@ spec:
{{- if .Values.extraEnv }}
{{ toYaml .Values.extraEnv | indent 8}}
{{- end }}
livenessProbe:
startupProbe:
httpGet:
path: /healthz
port: 80
initialDelaySeconds: {{.Values.livenessProbe.initialDelaySeconds | default 60 }}
periodSeconds: {{ .Values.livenessProbe.periodSeconds | default 30 }}
readinessProbe:
timeoutSeconds: {{ .Values.startupProbe.timeoutSeconds }}
failureThreshold: {{ .Values.startupProbe.failureThreshold }}
periodSeconds: {{ .Values.startupProbe.periodSeconds }}
livenessProbe:
httpGet:
path: /healthz
port: 80
initialDelaySeconds: {{.Values.readinessProbe.initialDelaySeconds | default 5}}
periodSeconds: {{ .Values.readinessProbe.periodSeconds | default 30}}
{{- if .Values.startupProbe }}
startupProbe:
{{- with .Values.livenessProbe.initialDelaySeconds}}
initialDelaySeconds: {{ . }}
{{- end }}
timeoutSeconds: {{.Values.livenessProbe.timeoutSeconds }}
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
failureThreshold: {{.Values.livenessProbe.failureThreshold }}
readinessProbe:
httpGet:
path: /healthz
port: 80
failureThreshold: {{.Values.startupProbe.failureThreshold | default 1}}
periodSeconds: {{ .Values.startupProbe.periodSeconds | default 30}}
{{- end }}
{{- with .Values.readinessProbe.initialDelaySeconds}}
initialDelaySeconds: {{ . }}
{{- end }}
timeoutSeconds: {{.Values.readinessProbe.timeoutSeconds }}
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
failureThreshold: {{.Values.readinessProbe.failureThreshold }}
resources:
{{ toYaml .Values.resources | indent 10 }}
volumeMounts:
Expand Down Expand Up @@ -220,16 +227,8 @@ spec:
{{- if eq .Values.auditLog.destination "sidecar" }}
{{- if gt (int .Values.auditLog.level) 0 }}
# Make audit logs available for Rancher log collector tools.
{{- if .Values.busyboxImage }}
- image: {{ .Values.busyboxImage}}
{{- else }}
- image: {{ .Values.auditLog.image.repository }}:{{.Values.auditLog.image.tag}}
{{- end }}
{{- if .Values.busyboxImagePullPolicy }}
imagePullPolicy: {{ .Values.busyboxImagePullPolicy }}
{{- else }}
imagePullPolicy: {{ .Values.auditLog.image.pullPolicy }}
{{- end }}
- image: {{ include "auditLog_image" . }}
imagePullPolicy: {{ default .Values.auditLog.image.pullPolicy .Values.busyboxImagePullPolicy }}
name: {{ template "rancher.name" . }}-audit-log
command: ["tail"]
args: ["-F", "/var/log/auditlog/rancher-api-audit.log"]
Expand Down
4 changes: 2 additions & 2 deletions charts/rancher/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ spec:
servicePort: {{ .Values.ingress.servicePort }}
{{- end }}
{{- if or (.Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress") (not (.Capabilities.APIVersions.Has "networking.k8s.io/v1beta1/Ingress")) }}
pathType: ImplementationSpecific
path: "/"
pathType: {{ .Values.ingress.pathType }}
path: {{ .Values.ingress.path }}
{{- end }}
{{- if eq .Values.tls "ingress" }}
tls:
Expand Down
31 changes: 23 additions & 8 deletions charts/rancher/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ additionalTrustedCAs: false
antiAffinity: preferred
topologyKey: kubernetes.io/hostname

# Audit Logs https://rancher.com/docs/rancher/v2.x/en/installation/api-auditing/
# Audit Logs
# Source: https://ranchermanager.docs.rancher.com/how-to-guides/advanced-user-guides/enable-api-audit-log
# The audit log is piped to the console of the rancher-audit-log container in the rancher pod.
# https://rancher.com/docs/rancher/v2.x/en/installation/api-auditing/
# destination stream to sidecar container console or hostPath volume
# level: Verbosity of logs, 0 to 3. 0 is off 3 is a lot.
# level: Verbosity of logs, 0 to 3. 0 is off, 3 most verbose.
# Docs: https://ranchermanager.docs.rancher.com/how-to-guides/advanced-user-guides/enable-api-audit-log#audit-log-levels
auditLog:
destination: sidecar
hostPath: /var/log/rancher/audit/
Expand All @@ -23,7 +23,7 @@ auditLog:
# Important: update pkg/image/export/resolve.go when this default image is changed, so that it's reflected accordingly in rancher-images.txt generated for air-gapped setups.
image:
repository: "rancher/mirrored-bci-micro"
tag: 15.4.14.3
tag: 15.6.24.2
# Override imagePullPolicy image
# options: Always, Never, IfNotPresent
pullPolicy: "IfNotPresent"
Expand All @@ -37,6 +37,11 @@ debug: false
# When starting Rancher for the first time, bootstrap the admin as restricted-admin
restrictedAdmin: false

# Control how the Rancher agents validate TLS connections
# Valid options: strict, or system-store
# Note, for new installations empty will default to strict on 2.9+, or system-store on 2.8 or older
agentTLSMode: ""

# Extra environment variables passed to the rancher pods.
# extraEnv:
# - name: CATTLE_TLS_MIN_VERSION
Expand All @@ -60,6 +65,9 @@ ingress:
includeDefaultExtraAnnotations: true
extraAnnotations: {}
ingressClassName: ""
# Certain ingress controllers will will require the pathType or path to be set to a different value.
pathType: ImplementationSpecific
path: "/"
# backend port number
servicePort: 80

Expand Down Expand Up @@ -155,7 +163,7 @@ postDelete:
enabled: true
image:
repository: rancher/shell
tag: v0.1.25
tag: v0.2.1
namespaceList:
- cattle-fleet-system
- cattle-system
Expand All @@ -168,12 +176,19 @@ postDelete:
# Set a bootstrap password. If leave empty, a random password will be generated.
bootstrapPassword: ""

startupProbe:
## should be ready within 2 minutes
timeoutSeconds: 5
periodSeconds: 10
failureThreshold: 12
livenessProbe:
initialDelaySeconds: 60
timeoutSeconds: 5
periodSeconds: 30
failureThreshold: 5
readinessProbe:
initialDelaySeconds: 5
timeoutSeconds: 5
periodSeconds: 30
failureThreshold: 5

global:
cattle:
Expand Down

0 comments on commit 7badbb9

Please sign in to comment.