Skip to content

Commit

Permalink
align with openyurt helm charts from commit 32ec5727368e8093335a94afe…
Browse files Browse the repository at this point in the history
…1b6e00bf1269d25
  • Loading branch information
openyurt-bot committed Jul 26, 2024
1 parent 8af9ebb commit 9eb2f88
Show file tree
Hide file tree
Showing 31 changed files with 14,602 additions and 0 deletions.
24 changes: 24 additions & 0 deletions charts/yurt-coordinator/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: v2
name: yurt-coordinator
description: A Helm chart for OpenYurt yurt-coordinator component

# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.5.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "v1.5.0"
33 changes: 33 additions & 0 deletions charts/yurt-coordinator/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "yurt-coordinator.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "yurt-coordinator.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "yurt-coordinator.labels" -}}
helm.sh/chart: {{ include "yurt-coordinator.chart" . }}
{{ include "yurt-coordinator.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Selector labels
*/}}
{{- define "yurt-coordinator.selectorLabels" -}}
app.kubernetes.io/name: {{ include "yurt-coordinator.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
228 changes: 228 additions & 0 deletions charts/yurt-coordinator/templates/yurt-coordinator.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,228 @@
apiVersion: v1
kind: Service
metadata:
name: yurt-coordinator-apiserver
namespace: {{ .Release.Namespace }}
annotations:
openyurt.io/topologyKeys: openyurt.io/nodepool
labels:
{{- include "yurt-coordinator.labels" . | nindent 4 }}
spec:
type: ClusterIP
ports:
- port: 443
targetPort: {{ .Values.apiserverSecurePort }}
protocol: TCP
name: https
selector:
{{- include "yurt-coordinator.selectorLabels" . | nindent 4 }}
---
apiVersion: v1
kind: Service
metadata:
name: yurt-coordinator-etcd
namespace: {{ .Release.Namespace }}
annotations:
openyurt.io/topologyKeys: openyurt.io/nodepool
labels:
{{- include "yurt-coordinator.labels" . | nindent 4 }}
spec:
type: ClusterIP
ports:
- port: 2379
targetPort: {{ .Values.etcdPort }}
protocol: TCP
name: https
selector:
{{- include "yurt-coordinator.selectorLabels" . | nindent 4 }}
---
apiVersion: apps.openyurt.io/v1alpha1
kind: YurtAppDaemon
metadata:
name: yurt-coordinator
namespace: {{ .Release.Namespace }}
labels:
{{- include "yurt-coordinator.labels" . | nindent 4 }}
spec:
selector:
matchLabels:
{{- include "yurt-coordinator.selectorLabels" . | nindent 6 }}
nodepoolSelector:
matchLabels:
openyurt.io/node-pool-type: "edge"
workloadTemplate:
deploymentTemplate:
metadata:
labels:
{{- include "yurt-coordinator.labels" . | nindent 10 }}
spec:
replicas: 1
selector:
matchLabels:
{{- include "yurt-coordinator.selectorLabels" . | nindent 12 }}
template:
metadata:
labels:
{{- include "yurt-coordinator.labels" . | nindent 14 }}
spec:
containers:
- command:
- kube-apiserver
- --bind-address=0.0.0.0
- --allow-privileged=true
- --anonymous-auth=true
- --authorization-mode=Node,RBAC
- --client-ca-file=/etc/kubernetes/pki/ca.crt
- --enable-admission-plugins=NodeRestriction
- --enable-bootstrap-token-auth=true
- --disable-admission-plugins=ServiceAccount
- --etcd-cafile=/etc/kubernetes/pki/ca.crt
- --etcd-certfile=/etc/kubernetes/pki/apiserver-etcd-client.crt
- --etcd-keyfile=/etc/kubernetes/pki/apiserver-etcd-client.key
- --etcd-servers=https://127.0.0.1:{{ .Values.etcdPort }}
- --kubelet-client-certificate=/etc/kubernetes/pki/apiserver-kubelet-client.crt
- --kubelet-client-key=/etc/kubernetes/pki/apiserver-kubelet-client.key
- --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname
- --secure-port={{ .Values.apiserverSecurePort }}
- --service-account-issuer=https://kubernetes.default.svc.cluster.local
- --service-account-key-file=/etc/kubernetes/pki/sa.pub
- --service-account-signing-key-file=/etc/kubernetes/pki/sa.key
- --service-cluster-ip-range={{ .Values.serviceClusterIPRange }}
- --tls-cert-file=/etc/kubernetes/pki/apiserver.crt
- --tls-private-key-file=/etc/kubernetes/pki/apiserver.key
image: "{{ .Values.apiserverImage.registry }}/{{ .Values.apiserverImage.repository }}:{{ .Values.apiserverImage.tag }}"
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 8
httpGet:
host: 127.0.0.1
path: /livez
port: {{ .Values.apiserverSecurePort }}
scheme: HTTPS
initialDelaySeconds: 10
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 15
name: kube-apiserver
readinessProbe:
failureThreshold: 3
httpGet:
host: 127.0.0.1
path: /readyz
port: {{ .Values.apiserverSecurePort }}
scheme: HTTPS
periodSeconds: 1
successThreshold: 1
timeoutSeconds: 15
{{- if .Values.apiserverResources }}
resources:
{{- toYaml .Values.apiserverResources | nindent 18 }}
{{- end }}
startupProbe:
failureThreshold: 24
httpGet:
host: 127.0.0.1
path: /livez
port: {{ .Values.apiserverSecurePort }}
scheme: HTTPS
initialDelaySeconds: 10
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 15
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /etc/kubernetes/pki
name: yurt-coordinator-certs
readOnly: true
- command:
- etcd
- --advertise-client-urls=https://0.0.0.0:{{ .Values.etcdPort }}
- --listen-client-urls=https://0.0.0.0:{{ .Values.etcdPort }}
- --cert-file=/etc/kubernetes/pki/etcd-server.crt
- --client-cert-auth=true
- --max-txn-ops=102400
- --data-dir=/var/lib/etcd
- --max-request-bytes=100000000
- --key-file=/etc/kubernetes/pki/etcd-server.key
- --listen-metrics-urls=http://0.0.0.0:{{ .Values.etcdMetricPort }}
- --snapshot-count=10000
- --trusted-ca-file=/etc/kubernetes/pki/ca.crt
image: "{{ .Values.etcdImage.registry }}/{{ .Values.etcdImage.repository }}:{{ .Values.etcdImage.tag }}"
imagePullPolicy: IfNotPresent
name: etcd
{{- if .Values.etcdResources}}
resources:
{{- toYaml .Values.etcdResources | nindent 18 }}
{{- end }}
startupProbe:
failureThreshold: 24
httpGet:
host: 127.0.0.1
path: /health
port: {{ .Values.etcdMetricPort }}
scheme: HTTP
initialDelaySeconds: 10
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 15
volumeMounts:
- mountPath: /var/lib/etcd
name: etcd-data
- mountPath: /etc/kubernetes/pki
name: yurt-coordinator-certs
readOnly: true
dnsPolicy: ClusterFirst
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{ toYaml .Values.imagePullSecrets | nindent 14 }}
{{- end }}
enableServiceLinks: true
hostNetwork: true
preemptionPolicy: PreemptLowerPriority
priority: 2000001000
priorityClassName: system-node-critical
restartPolicy: Always
schedulerName: default-scheduler
securityContext:
seccompProfile:
type: RuntimeDefault
terminationGracePeriodSeconds: 30
volumes:
- emptyDir:
medium: Memory
name: etcd-data
- projected:
defaultMode: 420
sources:
- secret:
name: yurt-coordinator-dynamic-certs
- secret:
name: yurt-coordinator-static-certs
name: yurt-coordinator-certs
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: openyurt:yurt-coordinator:node-lease-proxy-client
rules:
- apiGroups:
- "coordination.k8s.io"
resources:
- leases
verbs:
- get
- update
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: openyurt:yurt-coordinator:node-lease-proxy-client
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: openyurt:yurt-coordinator:node-lease-proxy-client
subjects:
- apiGroup: rbac.authorization.k8s.io
kind: User
name: openyurt:yurt-coordinator:node-lease-proxy-client
27 changes: 27 additions & 0 deletions charts/yurt-coordinator/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Default values for yurt-coordinator.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

nameOverride: ""
apiserverSecurePort: 10270
apiserverImage:
registry: registry.k8s.io
repository: kube-apiserver
tag: v1.22.0
apiserverResources:
requests:
cpu: 250m
serviceClusterIPRange: 10.96.0.0/12
etcdPort: 12379
etcdMetricPort: 12381
etcdImage:
registry: registry.k8s.io
repository: etcd
tag: 3.5.0-0
etcdResources:
limits:
cpu: 200m
memory: 512Mi
requests:
cpu: 100m
memory: 256Mi
24 changes: 24 additions & 0 deletions charts/yurt-iot-dock/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: v2
name: yurt-iot-dock
description: A Helm chart for OpenYurt yurt-iot-dock component.

# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.5.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "v1.5.0"
Loading

0 comments on commit 9eb2f88

Please sign in to comment.