Skip to content

Commit c181314

Browse files
committed
Merge version v0.7.0
2 parents 649fabe + f999696 commit c181314

17 files changed

+66
-34
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Deploy Kubernetes in Kubernetes using Helm
2626

2727
```bash
2828
helm repo add kvaps https://kvaps.github.io/charts
29-
helm install foo kvaps/kubernetes --version 0.6.1 \
29+
helm install foo kvaps/kubernetes --version 0.7.0 \
3030
--namespace foo \
3131
--create-namespace \
3232
--set persistence.storageClassName=local-path

build/tools/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM docker.io/library/alpine:3.12
22

33
RUN apk add --no-cache openssl
4-
ARG VERSION=v1.19.1
4+
ARG VERSION=v1.19.3
55
RUN wget "https://storage.googleapis.com/kubernetes-release/release/${VERSION}/bin/linux/amd64/kubectl" \
66
-O /usr/local/bin/kubectl \
77
&& chmod +x /usr/local/bin/kubectl

deploy/helm/kubernetes/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: kubernetes
22
description: Production-Grade Container Scheduling and Management
3-
version: 0.6.1
4-
appVersion: 1.19.0
3+
version: 0.7.0
4+
appVersion: 1.19.3
55
icon: https://upload.wikimedia.org/wikipedia/commons/thumb/3/39/Kubernetes_logo_without_workmark.svg/723px-Kubernetes_logo_without_workmark.svg.png
66
keywords:
77
- kubernetes

deploy/helm/kubernetes/manifests/konnectivity-agent-deployment.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,12 @@ spec:
4444
{{- toYaml . | nindent 6 }}
4545
{{- end }}
4646
containers:
47-
- image: {{ .Values.konnectivityAgent.image.repository }}:{{ .Values.konnectivityAgent.image.tag }}
48-
name: konnectivity-agent
49-
command: ["/proxy-agent"]
50-
args:
47+
- name: konnectivity-agent
48+
{{- with .Values.konnectivityAgent.image }}
49+
image: "{{ .repository }}{{ if .digest }}@{{ .digest }}{{ else }}:{{ .tag }}{{ end }}"
50+
{{- end }}
51+
command:
52+
- /proxy-agent
5153
- --logtostderr=true
5254
- --ca-cert=/var/run/secrets/kubernetes.io/serviceaccount/ca.crt
5355
- --service-account-token-path=/var/run/secrets/tokens/konnectivity-agent-token

deploy/helm/kubernetes/templates/_helpers.tpl

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,25 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
1515
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
1616
{{- else -}}
1717
{{- $name := default "kubernetes" .Values.nameOverride -}}
18-
{{- if or (contains $name .Release.Name) (eq (.Release.Name | upper) "RELEASE-NAME") -}}
18+
{{- if or (eq $name .Release.Name) (eq (.Release.Name | upper) "RELEASE-NAME") -}}
1919
{{- $name | trunc 63 | trimSuffix "-" -}}
2020
{{- else -}}
2121
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
2222
{{- end -}}
2323
{{- end -}}
2424
{{- end -}}
2525

26+
{{/*
27+
Create a default certificate name.
28+
*/}}
29+
{{- define "kubernetes.certname" -}}
30+
{{- if .Values.certnameOverride -}}
31+
{{- .Values.certnameOverride | trunc 63 | trimSuffix "-" -}}
32+
{{- else -}}
33+
{{- template "kubernetes.fullname" . -}}
34+
{{- end -}}
35+
{{- end -}}
36+
2637
{{/*
2738
Generate etcd servers list.
2839
*/}}

deploy/helm/kubernetes/templates/admin-deployment.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ spec:
5151
terminationGracePeriodSeconds: 5
5252
containers:
5353
- command: [ 'sleep', 'infinity' ]
54-
image: {{ .Values.admin.image.repository }}:{{ .Values.admin.image.tag }}
54+
{{- with .Values.admin.image }}
55+
image: "{{ .repository }}{{ if .digest }}@{{ .digest }}{{ else }}:{{ .tag }}{{ end }}"
56+
{{- end }}
5557
imagePullPolicy: {{ .Values.admin.image.PullPolicy }}
5658
name: admin
5759
livenessProbe:

deploy/helm/kubernetes/templates/apiserver-deployment.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{{- if .Values.apiServer.enabled }}
22
{{- $fullName := include "kubernetes.fullname" . -}}
3+
{{- $certName := include "kubernetes.certname" . -}}
34
---
45
apiVersion: apps/v1
56
kind: Deployment
@@ -68,7 +69,7 @@ spec:
6869
- --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname
6970
- --proxy-client-cert-file=/pki/front-proxy-client/tls.crt
7071
- --proxy-client-key-file=/pki/front-proxy-client/tls.key
71-
- --requestheader-allowed-names={{ $fullName }}-pki-front-proxy-client
72+
- --requestheader-allowed-names={{ $certName }}-front-proxy-client
7273
- --requestheader-client-ca-file=/pki/front-proxy-client/ca.crt
7374
- --requestheader-extra-headers-prefix=X-Remote-Extra-
7475
- --requestheader-group-headers=X-Remote-Group
@@ -95,7 +96,9 @@ spec:
9596
ports:
9697
- containerPort: {{ .Values.apiServer.port }}
9798
name: client
98-
image: {{ .Values.apiServer.image.repository }}:{{ .Values.apiServer.image.tag }}
99+
{{- with .Values.apiServer.image }}
100+
image: "{{ .repository }}{{ if .digest }}@{{ .digest }}{{ else }}:{{ .tag }}{{ end }}"
101+
{{- end }}
99102
imagePullPolicy: {{ .Values.apiServer.image.PullPolicy }}
100103
livenessProbe:
101104
failureThreshold: 8

deploy/helm/kubernetes/templates/controller-manager-deployment.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@ spec:
6969
{{- range $key, $value := .Values.controllerManager.extraArgs }}
7070
- --{{ $key }}={{ $value }}
7171
{{- end }}
72-
image: {{ .Values.controllerManager.image.repository }}:{{ .Values.controllerManager.image.tag }}
72+
{{- with .Values.controllerManager.image }}
73+
image: "{{ .repository }}{{ if .digest }}@{{ .digest }}{{ else }}:{{ .tag }}{{ end }}"
74+
{{- end }}
7375
imagePullPolicy: {{ .Values.controllerManager.image.PullPolicy }}
7476
livenessProbe:
7577
failureThreshold: 8

deploy/helm/kubernetes/templates/etcd-certs.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
{{- if .Values.etcd.enabled }}
22
{{- $fullName := include "kubernetes.fullname" . -}}
3+
{{- $certName := include "kubernetes.certname" . -}}
34
---
45
apiVersion: cert-manager.io/v1
56
kind: Certificate
67
metadata:
78
name: "{{ $fullName }}-pki-etcd-ca"
89
spec:
9-
commonName: "{{ $fullName }}-pki-etcd-ca"
10+
commonName: "{{ $certName }}-etcd-ca"
1011
secretName: "{{ $fullName }}-pki-etcd-ca"
1112
duration: 87600h # 3650d
1213
renewBefore: 8760h # 365d
@@ -44,7 +45,7 @@ kind: Certificate
4445
metadata:
4546
name: "{{ $fullName }}-pki-etcd-peer"
4647
spec:
47-
commonName: "{{ $fullName }}-pki-etcd-peer"
48+
commonName: "{{ $certName }}-etcd-peer"
4849
secretName: "{{ $fullName }}-pki-etcd-peer"
4950
duration: 8760h # 365d
5051
renewBefore: 4380h # 178d
@@ -75,7 +76,7 @@ kind: Certificate
7576
metadata:
7677
name: "{{ $fullName }}-pki-etcd-server"
7778
spec:
78-
commonName: "{{ $fullName }}-pki-etcd-server"
79+
commonName: "{{ $certName }}-etcd-server"
7980
secretName: "{{ $fullName }}-pki-etcd-server"
8081
duration: 8760h # 365d
8182
renewBefore: 4380h # 178d
@@ -120,7 +121,7 @@ kind: Certificate
120121
metadata:
121122
name: "{{ $fullName }}-pki-etcd-healthcheck-client"
122123
spec:
123-
commonName: "{{ $fullName }}-pki-etcd-healthcheck-client"
124+
commonName: "{{ $certName }}-etcd-healthcheck-client"
124125
secretName: "{{ $fullName }}-pki-etcd-healthcheck-client"
125126
duration: 8760h # 365d
126127
renewBefore: 4380h # 178d
@@ -140,7 +141,7 @@ kind: Certificate
140141
metadata:
141142
name: "{{ $fullName }}-pki-apiserver-etcd-client"
142143
spec:
143-
commonName: "{{ $fullName }}-pki-apiserver-etcd-client"
144+
commonName: "{{ $certName }}-apiserver-etcd-client"
144145
secretName: "{{ $fullName }}-pki-apiserver-etcd-client"
145146
duration: 8760h # 365d
146147
renewBefore: 4380h # 178d

deploy/helm/kubernetes/templates/etcd-statefulset.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,9 @@ spec:
9595
{{- with .Values.etcd.extraEnv }}
9696
{{- toYaml . | nindent 8 }}
9797
{{- end }}
98-
image: {{ .Values.etcd.image.repository }}:{{ .Values.etcd.image.tag }}
98+
{{- with .Values.etcd.image }}
99+
image: "{{ .repository }}{{ if .digest }}@{{ .digest }}{{ else }}:{{ .tag }}{{ end }}"
100+
{{- end }}
99101
ports:
100102
- containerPort: {{ .Values.etcd.ports.client }}
101103
name: client

0 commit comments

Comments
 (0)