Skip to content

Commit 1c5c6c0

Browse files
committed
update charts
1 parent fc5817b commit 1c5c6c0

15 files changed

+78
-63
lines changed

.github/workflows/sync-helm.yaml

Lines changed: 0 additions & 22 deletions
This file was deleted.

README.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,21 @@ Helm's [documentation](https://helm.sh/docs) to get started.
88

99
Once Helm has been set up correctly, add the repo as follows:
1010

11-
helm repo add runtime-copilot https://lengrongfu.github.io/runtime-copilot
11+
helm repo add runtime-copilot https://lengrongfu.github.io/runtime-copilot
12+
13+
If you is first time to use this repo, you need to run command as follows:
14+
15+
helm repo update
16+
helm search repo runtime-copilot
1217

1318
If you had already added this repo earlier, run `helm repo update` to retrieve
1419
the latest versions of the packages. You can then run `helm search repo
1520
runtime-copilot` to see the charts.
1621

17-
To install the <chart-name> chart:
22+
To install the runtime-copilot chart:
1823

19-
helm install runtime-copilot runtime-copilot/runtime-copilot
24+
helm install runtime-copilot runtime-copilot/charts --namespace runtime-copilot
2025

2126
To uninstall the chart:
2227

23-
helm delete runtime-copilot
28+
helm delete runtime-copilot --namespace runtime-copilot

charts/runtime-copilot/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
apiVersion: v2
2-
name: charts
2+
name: runtime-copilot
33
description: A Helm chart for Kubernetes
44

55
# A chart can be either an 'application' or a 'library' chart.
@@ -21,4 +21,4 @@ version: 0.1.0
2121
# incremented each time you make changes to the application. Versions are not expected to
2222
# follow Semantic Versioning. They should reflect the version the application is using.
2323
# It is recommended to use it with quotes.
24-
appVersion: "1.16.0"
24+
appVersion: "0.0.1"

charts/runtime-copilot/README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Runtime Copilot Helm Charts
2+
The main function of the runtime copilot is to assist the operation of the container runtime component (containerd), specifically for adding or deleting non-safe registries.
3+
4+
## Usage
5+
6+
[Helm](https://helm.sh) must be installed to use the charts. Please refer to
7+
Helm's [documentation](https://helm.sh/docs) to get started.
8+
9+
Once Helm has been set up correctly, add the repo as follows:
10+
11+
helm repo add runtime-copilot https://lengrongfu.github.io/runtime-copilot
12+
13+
If you is first time to use this repo, you need to run command as follows:
14+
15+
helm repo update
16+
helm search repo runtime-copilot
17+
18+
If you had already added this repo earlier, run `helm repo update` to retrieve
19+
the latest versions of the packages. You can then run `helm search repo
20+
runtime-copilot` to see the charts.
21+
22+
To install the runtime-copilot chart:
23+
24+
helm install runtime-copilot runtime-copilot/charts --namespace runtime-copilot
25+
26+
To uninstall the chart:
27+
28+
helm delete runtime-copilot --namespace runtime-copilot

charts/runtime-copilot/templates/_helpers.tpl

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,18 @@ Create chart name and version as used by the chart label.
3333
{{/*
3434
Common labels
3535
*/}}
36-
{{- define "charts.labels" -}}
36+
{{- define "charts.labels.daemon" -}}
3737
helm.sh/chart: {{ include "charts.chart" . }}
38-
{{ include "charts.selectorLabels" . }}
38+
{{ include "charts.selectorLabels.daemon" . }}
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+
{{- define "charts.labels.controllermanagaer" -}}
46+
helm.sh/chart: {{ include "charts.chart" . }}
47+
{{ include "charts.selectorLabels.controllermanagaer" . }}
3948
{{- if .Chart.AppVersion }}
4049
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
4150
{{- end }}
@@ -45,9 +54,14 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
4554
{{/*
4655
Selector labels
4756
*/}}
48-
{{- define "charts.selectorLabels" -}}
57+
{{- define "charts.selectorLabels.daemon" -}}
58+
app.kubernetes.io/name: {{ include "charts.name" . }}
59+
app.kubernetes.io/instance: {{ .Release.Name }}-daemon
60+
{{- end }}
61+
62+
{{- define "charts.selectorLabels.controllermanagaer" -}}
4963
app.kubernetes.io/name: {{ include "charts.name" . }}
50-
app.kubernetes.io/instance: {{ .Release.Name }}
64+
app.kubernetes.io/instance: {{ .Release.Name }}-deployment
5165
{{- end }}
5266

5367
{{/*

charts/runtime-copilot/templates/daemon.yaml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,23 @@ metadata:
44
name: {{ include "charts.fullname" . }}-daemon
55
namespace: {{ .Release.Namespace | default "default"}}
66
labels:
7-
{{- include "charts.labels" . | nindent 4 }}
7+
{{- include "charts.labels.daemon" . | nindent 4 }}
88
spec:
99
selector:
1010
matchLabels:
11-
{{- include "charts.selectorLabels" . | nindent 6 }}
12-
app.kubernetes.io/name: runtime-daemon
11+
{{- include "charts.selectorLabels.daemon" . | nindent 6 }}
1312
template:
1413
metadata:
1514
labels:
16-
{{- include "charts.selectorLabels" . | nindent 6 }}
17-
app.kubernetes.io/name: runtime-daemon
15+
{{- include "charts.selectorLabels.daemon" . | nindent 8 }}
1816
spec:
1917
{{- with .Values.imagePullSecrets }}
2018
imagePullSecrets:
2119
{{- toYaml . | nindent 8 }}
2220
{{- end }}
2321
serviceAccountName: {{ include "charts.serviceAccountName" . }}
2422
securityContext:
25-
{{- toYaml .Values.podSecurityContext | nindent 8 }}
23+
{{- toYaml .Values.daemonPodSecurityContext | nindent 8 }}
2624
containers:
2725
- name: {{ .Chart.Name }}-daemon
2826
securityContext:

charts/runtime-copilot/templates/deployment.yaml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,25 @@
11
apiVersion: apps/v1
22
kind: Deployment
33
metadata:
4-
name: {{ include "charts.fullname" . }}-copilot
4+
name: {{ include "charts.fullname" . }}-deploymment
55
namespace: {{ .Release.Namespace | default "default"}}
66
labels:
7-
{{- include "charts.labels" . | nindent 4 }}
7+
{{- include "charts.labels.controllermanagaer" . | nindent 4 }}
88
spec:
99
{{- if not .Values.autoscaling.enabled }}
1010
replicas: {{ .Values.replicaCount }}
1111
{{- end }}
1212
selector:
1313
matchLabels:
14-
{{- include "charts.selectorLabels" . | nindent 6 }}
15-
app.kubernetes.io/name: runtime-copilot
14+
{{- include "charts.selectorLabels.controllermanagaer" . | nindent 6 }}
1615
template:
1716
metadata:
1817
{{- with .Values.podAnnotations }}
1918
annotations:
2019
{{- toYaml . | nindent 8 }}
2120
{{- end }}
2221
labels:
23-
{{- include "charts.selectorLabels" . | nindent 8 }}
24-
app.kubernetes.io/name: runtime-copilot
22+
{{- include "charts.selectorLabels.controllermanagaer" . | nindent 8 }}
2523
spec:
2624
{{- with .Values.imagePullSecrets }}
2725
imagePullSecrets:
@@ -31,12 +29,13 @@ spec:
3129
securityContext:
3230
{{- toYaml .Values.podSecurityContext | nindent 8 }}
3331
containers:
34-
- name: {{ .Chart.Name }}-copilot
32+
- name: {{ .Chart.Name }}-controller-manager
3533
securityContext:
3634
{{- toYaml .Values.securityContext | nindent 12 }}
3735
image: "{{ .Values.image.registry }}/{{ .Values.image.controller_repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
3836
command:
3937
- /copilot
38+
- --leader-elect=true
4039
imagePullPolicy: {{ .Values.image.pullPolicy }}
4140
ports:
4241
- name: http

charts/runtime-copilot/templates/rbac/auth_proxy_service.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ metadata:
1010
app.kubernetes.io/part-of: runtime-copilot
1111
app.kubernetes.io/managed-by: kustomize
1212
name: controller-manager-metrics-service
13-
namespace: system
13+
namespace: {{ .Release.Namespace | default "default"}}
1414
spec:
1515
ports:
1616
- name: https

0 commit comments

Comments
 (0)