Skip to content

Commit ea3073e

Browse files
committed
feat: adding helmify generated helm chart
1 parent 46ee573 commit ea3073e

15 files changed

+783
-1
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*.orig
18+
*~
19+
# Various IDEs
20+
.project
21+
.idea/
22+
*.tmproj
23+
.vscode/
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
apiVersion: v2
2+
name: kube-startup-cpu-boost
3+
description: A Helm chart for kube-startup-cpu-boost operator
4+
type: application
5+
version: 0.1.0 #x-release-please-version
6+
appVersion: "0.1.0" #x-release-please-version
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{{/*
2+
Expand the name of the chart.
3+
*/}}
4+
{{- define "kube-startup-cpu-boost.name" -}}
5+
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
6+
{{- end }}
7+
8+
{{/*
9+
Create a default fully qualified app name.
10+
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
11+
If release name contains chart name it will be used as a full name.
12+
*/}}
13+
{{- define "kube-startup-cpu-boost.fullname" -}}
14+
{{- if .Values.fullnameOverride }}
15+
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
16+
{{- else }}
17+
{{- $name := default .Chart.Name .Values.nameOverride }}
18+
{{- if contains $name .Release.Name }}
19+
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
20+
{{- else }}
21+
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
22+
{{- end }}
23+
{{- end }}
24+
{{- end }}
25+
26+
{{/*
27+
Create chart name and version as used by the chart label.
28+
*/}}
29+
{{- define "kube-startup-cpu-boost.chart" -}}
30+
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
31+
{{- end }}
32+
33+
{{/*
34+
Common labels
35+
*/}}
36+
{{- define "kube-startup-cpu-boost.labels" -}}
37+
helm.sh/chart: {{ include "kube-startup-cpu-boost.chart" . }}
38+
{{ include "kube-startup-cpu-boost.selectorLabels" . }}
39+
{{- if .Chart.AppVersion }}
40+
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
41+
{{- end }}
42+
app.kubernetes.io/managed-by: {{ .Release.Service }}
43+
{{- end }}
44+
45+
{{/*
46+
Selector labels
47+
*/}}
48+
{{- define "kube-startup-cpu-boost.selectorLabels" -}}
49+
app.kubernetes.io/name: {{ include "kube-startup-cpu-boost.name" . }}
50+
app.kubernetes.io/instance: {{ .Release.Name }}
51+
{{- end }}
52+
53+
{{/*
54+
Create the name of the service account to use
55+
*/}}
56+
{{- define "kube-startup-cpu-boost.serviceAccountName" -}}
57+
{{- if .Values.serviceAccount.create }}
58+
{{- default (include "kube-startup-cpu-boost.fullname" .) .Values.serviceAccount.name }}
59+
{{- else }}
60+
{{- default "default" .Values.serviceAccount.name }}
61+
{{- end }}
62+
{{- end }}
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: kube-startup-cpu-boost-controller-manager
5+
labels:
6+
app.kubernetes.io/component: manager
7+
app.kubernetes.io/created-by: kube-startup-cpu-boost
8+
app.kubernetes.io/part-of: kube-startup-cpu-boost
9+
control-plane: controller-manager
10+
{{- include "kube-startup-cpu-boost.labels" . | nindent 4 }}
11+
spec:
12+
replicas: {{ .Values.controllerManager.replicas }}
13+
selector:
14+
matchLabels:
15+
control-plane: controller-manager
16+
{{- include "kube-startup-cpu-boost.selectorLabels" . | nindent 6 }}
17+
template:
18+
metadata:
19+
labels:
20+
control-plane: controller-manager
21+
{{- include "kube-startup-cpu-boost.selectorLabels" . | nindent 8 }}
22+
annotations:
23+
kubectl.kubernetes.io/default-container: manager
24+
spec:
25+
affinity:
26+
nodeAffinity:
27+
requiredDuringSchedulingIgnoredDuringExecution:
28+
nodeSelectorTerms:
29+
- matchExpressions:
30+
- key: kubernetes.io/arch
31+
operator: In
32+
values:
33+
- amd64
34+
- arm64
35+
- key: kubernetes.io/os
36+
operator: In
37+
values:
38+
- linux
39+
containers:
40+
- command:
41+
- /manager
42+
env:
43+
- name: POD_NAMESPACE
44+
valueFrom:
45+
fieldRef:
46+
fieldPath: metadata.namespace
47+
- name: LEADER_ELECTION
48+
value: {{ quote .Values.controllerManager.manager.env.leaderElection }}
49+
- name: KUBERNETES_CLUSTER_DOMAIN
50+
value: {{ quote .Values.kubernetesClusterDomain }}
51+
image: {{ .Values.controllerManager.manager.image.repository }}:{{ .Values.controllerManager.manager.image.tag
52+
| default .Chart.AppVersion }}
53+
livenessProbe:
54+
httpGet:
55+
path: /healthz
56+
port: 8081
57+
initialDelaySeconds: 15
58+
periodSeconds: 20
59+
name: manager
60+
ports:
61+
- containerPort: 9443
62+
name: webhook-server
63+
protocol: TCP
64+
- containerPort: 8080
65+
name: metrics
66+
readinessProbe:
67+
httpGet:
68+
path: /readyz
69+
port: 8081
70+
initialDelaySeconds: 5
71+
periodSeconds: 10
72+
resources: {{- toYaml .Values.controllerManager.manager.resources | nindent 10
73+
}}
74+
securityContext: {{- toYaml .Values.controllerManager.manager.containerSecurityContext
75+
| nindent 10 }}
76+
volumeMounts:
77+
- mountPath: /tmp/k8s-webhook-server/serving-certs
78+
name: cert
79+
readOnly: true
80+
securityContext: {{- toYaml .Values.controllerManager.podSecurityContext | nindent
81+
8 }}
82+
serviceAccountName: kube-startup-cpu-boost-controller-manager
83+
terminationGracePeriodSeconds: 10
84+
volumes:
85+
- name: cert
86+
secret:
87+
defaultMode: 420
88+
secretName: kube-startup-cpu-boost-webhook-secret
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
apiVersion: rbac.authorization.k8s.io/v1
2+
kind: Role
3+
metadata:
4+
name: kube-startup-cpu-boost-internal-cert-role
5+
labels:
6+
app.kubernetes.io/component: internal-cert
7+
app.kubernetes.io/created-by: kube-startup-cpu-boost
8+
app.kubernetes.io/part-of: kube-startup-cpu-boost
9+
{{- include "kube-startup-cpu-boost.labels" . | nindent 4 }}
10+
rules:
11+
- apiGroups:
12+
- ""
13+
resources:
14+
- secrets
15+
verbs:
16+
- get
17+
- list
18+
- watch
19+
- create
20+
- update
21+
- patch
22+
- delete
23+
---
24+
apiVersion: rbac.authorization.k8s.io/v1
25+
kind: RoleBinding
26+
metadata:
27+
name: kube-startup-cpu-boost-internal-cert-rolebinding
28+
labels:
29+
app.kubernetes.io/component: internal-cert
30+
app.kubernetes.io/created-by: kube-startup-cpu-boost
31+
app.kubernetes.io/part-of: kube-startup-cpu-boost
32+
{{- include "kube-startup-cpu-boost.labels" . | nindent 4 }}
33+
roleRef:
34+
apiGroup: rbac.authorization.k8s.io
35+
kind: Role
36+
name: kube-startup-cpu-boost-internal-cert-role
37+
subjects:
38+
- kind: ServiceAccount
39+
name: kube-startup-cpu-boost-controller-manager
40+
namespace: '{{ .Release.Namespace }}'
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
apiVersion: rbac.authorization.k8s.io/v1
2+
kind: Role
3+
metadata:
4+
name: kube-startup-cpu-boost-leader-election-role
5+
labels:
6+
app.kubernetes.io/component: rbac
7+
app.kubernetes.io/created-by: kube-startup-cpu-boost
8+
app.kubernetes.io/part-of: kube-startup-cpu-boost
9+
{{- include "kube-startup-cpu-boost.labels" . | nindent 4 }}
10+
rules:
11+
- apiGroups:
12+
- ""
13+
resources:
14+
- configmaps
15+
verbs:
16+
- get
17+
- list
18+
- watch
19+
- create
20+
- update
21+
- patch
22+
- delete
23+
- apiGroups:
24+
- coordination.k8s.io
25+
resources:
26+
- leases
27+
verbs:
28+
- get
29+
- list
30+
- watch
31+
- create
32+
- update
33+
- patch
34+
- delete
35+
- apiGroups:
36+
- ""
37+
resources:
38+
- events
39+
verbs:
40+
- create
41+
- patch
42+
---
43+
apiVersion: rbac.authorization.k8s.io/v1
44+
kind: RoleBinding
45+
metadata:
46+
name: kube-startup-cpu-boost-leader-election-rolebinding
47+
labels:
48+
app.kubernetes.io/component: rbac
49+
app.kubernetes.io/created-by: kube-startup-cpu-boost
50+
app.kubernetes.io/part-of: kube-startup-cpu-boost
51+
{{- include "kube-startup-cpu-boost.labels" . | nindent 4 }}
52+
roleRef:
53+
apiGroup: rbac.authorization.k8s.io
54+
kind: Role
55+
name: kube-startup-cpu-boost-leader-election-role
56+
subjects:
57+
- kind: ServiceAccount
58+
name: kube-startup-cpu-boost-controller-manager
59+
namespace: '{{ .Release.Namespace }}'
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
apiVersion: rbac.authorization.k8s.io/v1
2+
kind: ClusterRole
3+
metadata:
4+
name: kube-startup-cpu-boost-manager-role
5+
labels:
6+
{{- include "kube-startup-cpu-boost.labels" . | nindent 4 }}
7+
rules:
8+
- nonResourceURLs:
9+
- /metrics
10+
verbs:
11+
- get
12+
- apiGroups:
13+
- ""
14+
resources:
15+
- pods
16+
verbs:
17+
- get
18+
- list
19+
- patch
20+
- update
21+
- watch
22+
- apiGroups:
23+
- ""
24+
resources:
25+
- pods/resize
26+
verbs:
27+
- patch
28+
- apiGroups:
29+
- admissionregistration.k8s.io
30+
resourceNames:
31+
- kube-startup-cpu-boost-mutating-webhook-configuration
32+
resources:
33+
- mutatingwebhookconfigurations
34+
verbs:
35+
- get
36+
- update
37+
- apiGroups:
38+
- admissionregistration.k8s.io
39+
resources:
40+
- mutatingwebhookconfigurations
41+
- validatingwebhookconfigurations
42+
verbs:
43+
- list
44+
- watch
45+
- apiGroups:
46+
- admissionregistration.k8s.io
47+
resourceNames:
48+
- kube-startup-cpu-boost-validating-webhook-configuration
49+
resources:
50+
- validatingwebhookconfigurations
51+
verbs:
52+
- get
53+
- update
54+
- apiGroups:
55+
- autoscaling.x-k8s.io
56+
resources:
57+
- startupcpuboosts
58+
verbs:
59+
- create
60+
- delete
61+
- get
62+
- list
63+
- patch
64+
- update
65+
- watch
66+
- apiGroups:
67+
- autoscaling.x-k8s.io
68+
resources:
69+
- startupcpuboosts/finalizers
70+
verbs:
71+
- update
72+
- apiGroups:
73+
- autoscaling.x-k8s.io
74+
resources:
75+
- startupcpuboosts/status
76+
verbs:
77+
- get
78+
- patch
79+
- update
80+
---
81+
apiVersion: rbac.authorization.k8s.io/v1
82+
kind: ClusterRoleBinding
83+
metadata:
84+
name: kube-startup-cpu-boost-manager-rolebinding
85+
labels:
86+
app.kubernetes.io/component: rbac
87+
app.kubernetes.io/created-by: kube-startup-cpu-boost
88+
app.kubernetes.io/part-of: kube-startup-cpu-boost
89+
{{- include "kube-startup-cpu-boost.labels" . | nindent 4 }}
90+
roleRef:
91+
apiGroup: rbac.authorization.k8s.io
92+
kind: ClusterRole
93+
name: kube-startup-cpu-boost-manager-role
94+
subjects:
95+
- kind: ServiceAccount
96+
name: kube-startup-cpu-boost-controller-manager
97+
namespace: '{{ .Release.Namespace }}'

0 commit comments

Comments
 (0)