forked from istio/installer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sync CNI charts from istio/cni 1.4 branch
Closes istio/istio#18576
- Loading branch information
Showing
10 changed files
with
211 additions
and
203 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{{- define "common_labels" }} | ||
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} | ||
release: {{ .Release.Name }} | ||
version: {{ .Chart.Version }} | ||
heritage: {{ .Release.Service }} | ||
{{- end }} | ||
|
||
{{- define "common_template_labels" }} | ||
version: {{ .Chart.Version }} | ||
{{- end }} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,163 @@ | ||
# Istio-CNI Version v0.1-dev | ||
# | ||
# This manifest installs the following component versions: | ||
# istio-cni:v0.1 | ||
|
||
|
||
kind: ClusterRole | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: istio-cni | ||
rules: | ||
- apiGroups: [""] | ||
resources: | ||
- pods | ||
- nodes | ||
verbs: | ||
- get | ||
|
||
--- | ||
|
||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: istio-cni | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: istio-cni | ||
subjects: | ||
- kind: ServiceAccount | ||
name: istio-cni | ||
namespace: {{ .Release.Namespace }} | ||
|
||
--- | ||
# This ConfigMap is used to configure a self-hosted Istio CNI installation. | ||
kind: ConfigMap | ||
apiVersion: v1 | ||
metadata: | ||
name: istio-cni-config | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
{{- template "common_labels" . }} | ||
data: | ||
# The CNI network configuration to add to the plugin chain on each node. The special | ||
# values in this config will be automatically populated. | ||
cni_network_config: |- | ||
{ | ||
"type": "istio-cni", | ||
"log_level": {{ quote .Values.logLevel }}, | ||
"kubernetes": { | ||
"kubeconfig": "__KUBECONFIG_FILEPATH__", | ||
"cni_bin_dir": {{ quote .Values.cniBinDir }}, | ||
"exclude_namespaces": [ {{ range $idx, $ns := .Values.excludeNamespaces }}{{ if $idx }}, {{ end }}{{ quote $ns }}{{ end }} ] | ||
} | ||
} | ||
--- | ||
|
||
# This manifest installs the Istio install-cni container, as well | ||
# as the Istio CNI plugin and config on | ||
# each master and worker node in a Kubernetes cluster. | ||
kind: DaemonSet | ||
apiVersion: apps/v1 | ||
metadata: | ||
name: istio-cni-node | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
k8s-app: istio-cni-node | ||
{{- template "common_labels" . }} | ||
spec: | ||
selector: | ||
matchLabels: | ||
k8s-app: istio-cni-node | ||
updateStrategy: | ||
type: RollingUpdate | ||
rollingUpdate: | ||
maxUnavailable: 1 | ||
template: | ||
metadata: | ||
labels: | ||
k8s-app: istio-cni-node | ||
annotations: | ||
# This, along with the CriticalAddonsOnly toleration below, | ||
# marks the pod as a critical add-on, ensuring it gets | ||
# priority scheduling and that its resources are reserved | ||
# if it ever gets evicted. | ||
scheduler.alpha.kubernetes.io/critical-pod: '' | ||
spec: | ||
nodeSelector: | ||
beta.kubernetes.io/os: linux | ||
hostNetwork: true | ||
tolerations: | ||
# Make sure istio-cni-node gets scheduled on all nodes. | ||
- effect: NoSchedule | ||
operator: Exists | ||
# Mark the pod as a critical add-on for rescheduling. | ||
- key: CriticalAddonsOnly | ||
operator: Exists | ||
- effect: NoExecute | ||
operator: Exists | ||
priorityClassName: system-cluster-critical | ||
serviceAccountName: istio-cni | ||
# Minimize downtime during a rolling upgrade or deletion; tell Kubernetes to do a "force | ||
# deletion": https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods. | ||
terminationGracePeriodSeconds: 5 | ||
containers: | ||
# This container installs the Istio CNI binaries | ||
# and CNI network config file on each node. | ||
- name: install-cni | ||
image: {{ .Values.hub }}/install-cni:{{ .Values.tag }} | ||
imagePullPolicy: {{ .Values.pullPolicy }} | ||
command: ["/install-cni.sh"] | ||
env: | ||
{{- if .Values.cniConfFileName }} | ||
# Name of the CNI config file to create. | ||
- name: CNI_CONF_NAME | ||
value: "{{ .Values.cniConfFileName }}" | ||
{{- end }} | ||
# The CNI network config to install on each node. | ||
- name: CNI_NETWORK_CONFIG | ||
valueFrom: | ||
configMapKeyRef: | ||
name: istio-cni-config | ||
key: cni_network_config | ||
- name: CNI_NET_DIR | ||
value: {{ default "/etc/cni/net.d" .Values.cniConfDir }} | ||
volumeMounts: | ||
- mountPath: /host/opt/cni/bin | ||
name: cni-bin-dir | ||
- mountPath: /host/etc/cni/net.d | ||
name: cni-net-dir | ||
volumes: | ||
# Used to install CNI. | ||
- name: cni-bin-dir | ||
hostPath: | ||
path: {{ default "/opt/cni/bin" .Values.cniBinDir }} | ||
- name: cni-net-dir | ||
hostPath: | ||
path: {{ default "/etc/cni/net.d" .Values.cniConfDir }} | ||
--- | ||
|
||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: istio-cni | ||
namespace: {{ .Release.Namespace }} | ||
|
||
--- | ||
{{- if ne .Values.psp_cluster_role "" }} | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: RoleBinding | ||
metadata: | ||
name: istio-cni-psp | ||
namespace: {{ .Release.Namespace }} | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: {{ .Values.psp_cluster_role }} | ||
subjects: | ||
- kind: ServiceAccount | ||
name: istio-cni | ||
namespace: {{ .Release.Namespace }} | ||
{{- end }} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.