-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(helm chart): Add metrics-server hardening options
- Loading branch information
1 parent
52f93bf
commit 725a870
Showing
9 changed files
with
318 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
args: | ||
- --kubelet-insecure-tls | ||
|
||
apiService: | ||
insecureSkipTLSVerify: false | ||
|
||
tls: | ||
type: cert-manager |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
args: | ||
- --kubelet-insecure-tls | ||
|
||
## Set via GH action (step "Prepare existing secret test scenario") | ||
# apiService: | ||
# insecureSkipTLSVerify: false | ||
# caBundle: | | ||
|
||
tls: | ||
type: existingSecret | ||
existingSecret: | ||
name: metrics-server-existing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
args: | ||
- --kubelet-insecure-tls | ||
|
||
apiService: | ||
insecureSkipTLSVerify: false | ||
|
||
tls: | ||
type: helm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{{- if eq .Values.tls.type "cert-manager" }} | ||
{{- if not .Values.tls.certManager.existingIssuer.enabled }} | ||
apiVersion: cert-manager.io/v1 | ||
kind: Issuer | ||
metadata: | ||
annotations: | ||
{{- toYaml .Values.additionalAnnotations | nindent 4 }} | ||
name: {{ include "metrics-server.fullname" . }}-issuer | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
selfSigned: {} | ||
{{- end }} | ||
--- | ||
apiVersion: cert-manager.io/v1 | ||
kind: Certificate | ||
metadata: | ||
name: {{ include "metrics-server.fullname" . }} | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
commonName: {{ include "metrics-server.fullname" . }} | ||
dnsNames: | ||
- {{ include "metrics-server.fullname" . }}.{{ .Release.Namespace }} | ||
- {{ include "metrics-server.fullname" . }}.{{ .Release.Namespace }}.svc | ||
- {{ include "metrics-server.fullname" . }}.{{ .Release.Namespace }}.svc.{{ .Values.tls.clusterDomain }} | ||
secretName: {{ include "metrics-server.fullname" . }} | ||
usages: | ||
- server auth | ||
- client auth | ||
privateKey: | ||
algorithm: RSA | ||
size: 2048 | ||
{{- with .Values.tls.certManager.duration }} | ||
duration: {{ . }} | ||
{{- end }} | ||
{{- with .Values.tls.certManager.renewBefore }} | ||
renewBefore: {{ . }} | ||
{{- end }} | ||
issuerRef: | ||
{{- if .Values.tls.certManager.existingIssuer.enabled }} | ||
name: {{ .Values.tls.certManager.existingIssuer.name }} | ||
kind: {{ .Values.tls.certManager.existingIssuer.kind }} | ||
{{- else }} | ||
name: {{ include "metrics-server.fullname" . }}-issuer | ||
kind: Issuer | ||
{{- end }} | ||
group: cert-manager.io | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters