File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,6 +31,13 @@ releases:
3131 autoDirectNodeRoutes : true
3232 routingMode : native
3333
34+ - name : cozy-proxy
35+ releaseName : cozystack
36+ chart : cozy-cozy-proxy
37+ namespace : cozy-system
38+ optional : true
39+ dependsOn : [cilium]
40+
3441- name : cert-manager-crds
3542 releaseName : cert-manager-crds
3643 chart : cozy-cert-manager-crds
Original file line number Diff line number Diff line change @@ -50,6 +50,12 @@ releases:
5050 SVC_CIDR : " {{ index $cozyConfig.data " ipv4-svc-cidr" }}"
5151 JOIN_CIDR : " {{ index $cozyConfig.data " ipv4-join-cidr" }}"
5252
53+ - name : cozy-proxy
54+ releaseName : cozystack
55+ chart : cozy-cozy-proxy
56+ namespace : cozy-system
57+ dependsOn : [cilium,kubeovn]
58+
5359- name : cert-manager-crds
5460 releaseName : cert-manager-crds
5561 chart : cozy-cert-manager-crds
Original file line number Diff line number Diff line change 1+ apiVersion : v2
2+ name : cozy-cozystack-api
3+ version : 0.0.0 # Placeholder, the actual version will be automatically set during the build process
Original file line number Diff line number Diff line change 1+ NAME =cozy-proxy
2+ NAMESPACE =cozy-system
3+
4+ include ../../../scripts/common-envs.mk
5+ include ../../../scripts/package.mk
6+
7+ update :
8+ rm -rf charts
9+ tag=$$(git ls-remote --tags --sort="v:refname" https://github.com/aenix-io/cozy-proxy | awk -F'[/^]' 'END{print $$3}' ) && \
10+ curl -sSL https://github.com/aenix-io/cozy-proxy/archive/refs/tags/$$ {tag}.tar.gz | \
11+ tar xzvf - --strip 1 cozy-proxy-$$ {tag#* v}/charts
Original file line number Diff line number Diff line change 1+ apiVersion : v2
2+ name : cozy-proxy
3+ description : A simple kube-proxy addon for 1:1 NAT services in Kubernetes using an NFT backend
4+ type : application
5+ version : 0.1.0
6+ appVersion : 0.1.0
Original file line number Diff line number Diff line change 1+ {{- define " cozy-proxy.name" -}}
2+ {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix " -" -}}
3+ {{- end -}}
4+
5+ {{- define " cozy-proxy.fullname" -}}
6+ {{- $name := default .Chart.Name .Values.nameOverride -}}
7+ {{- if .Values.fullnameOverride -}}
8+ {{- .Values.fullnameOverride | trunc 63 | trimSuffix " -" -}}
9+ {{- else -}}
10+ {{- if eq .Release.Name $name }}
11+ {{- .Release.Name | trunc 63 | trimSuffix " -" -}}
12+ {{- else -}}
13+ {{- printf " %s -%s " .Release.Name $name | trunc 63 | trimSuffix " -" -}}
14+ {{- end -}}
15+ {{- end -}}
16+ {{- end -}}
17+
18+ {{- define " cozy-proxy.labels" -}}
19+ helm.sh /chart: {{ include " cozy-proxy.name" . }}-{{ .Chart.Version | replace " +" " _" }}
20+ app.kubernetes.io /name: {{ include " cozy-proxy.name" . }}
21+ app.kubernetes.io /instance: {{ .Release.Name }}
22+ app.kubernetes.io /version: {{ .Chart.AppVersion }}
23+ app.kubernetes.io /managed-by: {{ .Release.Service }}
24+ {{- end -}}
Original file line number Diff line number Diff line change 1+ apiVersion : apps/v1
2+ kind : DaemonSet
3+ metadata :
4+ name : {{ include "cozy-proxy.fullname" . }}
5+ labels :
6+ {{- include "cozy-proxy.labels" . | nindent 4 }}
7+ spec :
8+ selector :
9+ matchLabels :
10+ app : {{ include "cozy-proxy.name" . }}
11+ template :
12+ metadata :
13+ labels :
14+ app : {{ include "cozy-proxy.name" . }}
15+ annotations :
16+ {{- toYaml .Values.daemonset.podAnnotations | nindent 8 }}
17+ spec :
18+ serviceAccountName : {{ include "cozy-proxy.fullname" . }}
19+ hostNetwork : {{ .Values.daemonset.hostNetwork }}
20+ containers :
21+ - name : cozy-proxy
22+ image : " {{ .Values.image.repository }}:{{ .Values.image.tag }}"
23+ imagePullPolicy : {{ .Values.image.pullPolicy }}
24+ securityContext :
25+ privileged : true
26+ capabilities :
27+ add : ["NET_ADMIN"]
Original file line number Diff line number Diff line change 1+ {{- if .Values.rbac.create }}
2+ apiVersion : rbac.authorization.k8s.io/v1
3+ kind : ClusterRole
4+ metadata :
5+ name : {{ include "cozy-proxy.fullname" . }}
6+ labels :
7+ {{- include "cozy-proxy.labels" . | nindent 4 }}
8+ rules :
9+ - apiGroups : [""]
10+ resources : ["services", "endpoints"]
11+ verbs : ["get", "list", "watch"]
12+ {{- end }}
Original file line number Diff line number Diff line change 1+ {{- if .Values.rbac.create }}
2+ apiVersion : rbac.authorization.k8s.io/v1
3+ kind : ClusterRoleBinding
4+ metadata :
5+ name : {{ include "cozy-proxy.fullname" . }}
6+ labels :
7+ {{- include "cozy-proxy.labels" . | nindent 4 }}
8+ subjects :
9+ - kind : ServiceAccount
10+ name : {{ include "cozy-proxy.fullname" . }}
11+ namespace : {{ .Release.Namespace }}
12+ roleRef :
13+ kind : ClusterRole
14+ name : {{ include "cozy-proxy.fullname" . }}
15+ apiGroup : rbac.authorization.k8s.io
16+ {{- end }}
Original file line number Diff line number Diff line change 1+ {{- if .Values.rbac.create }}
2+ apiVersion : v1
3+ kind : ServiceAccount
4+ metadata :
5+ name : {{ include "cozy-proxy.fullname" . }}
6+ labels :
7+ {{- include "cozy-proxy.labels" . | nindent 4 }}
8+ {{- end }}
You can’t perform that action at this time.
0 commit comments