Skip to content

Commit

Permalink
Merge pull request alibaba#358 from hhyasdf/update-hybridnet-chart-to…
Browse files Browse the repository at this point in the history
…-v0.5.11

chart: remove useless volume and add nodeSelector parameters
  • Loading branch information
mars1024 authored Jan 31, 2023
2 parents 34d622b + a546a99 commit b38108d
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 10 deletions.
5 changes: 3 additions & 2 deletions charts/hybridnet/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: hybridnet
# When the version is modified, make sure the artifacthub.io/changes list is updated
# Also update CHANGELOG.md
version: 0.5.10
version: 0.5.11
appVersion: 0.7.7
home: https://github.com/alibaba/hybridnet
description: A container networking solution aiming at hybrid clouds.
Expand All @@ -22,4 +22,5 @@ annotations:
artifacthub.io/prerelease: "false"
# List of changes for the release in artifacthub.io
artifacthub.io/changes: |
- "Update image to v0.7.7"
- "remove useless host var directory volume"
- "add nodeSelector parameters"
7 changes: 0 additions & 7 deletions charts/hybridnet/templates/daemonsets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,6 @@ spec:
name: host-modules
- mountPath: /run/xtables.lock
name: xtables-lock
- mountPath: /var/run/
name: host-var-run
mountPropagation: Bidirectional
{{ if .Values.daemon.enableFelixPolicy }}
- name: felix
image: "{{ .Values.images.registryURL }}/{{ .Values.images.hybridnet.image }}:{{ .Values.images.hybridnet.tag }}"
Expand Down Expand Up @@ -179,8 +176,4 @@ spec:
items:
- key: cni-config
path: cni-config
- name: host-var-run
hostPath:
path: /var/run/
type: "Directory"

21 changes: 20 additions & 1 deletion charts/hybridnet/templates/deployments.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,14 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
{{- if and .Values.manager .Values.manager.nodeSelector }}
nodeSelector:
{{- toYaml .Values.manager.nodeSelector | trim | nindent 8 }}
{{- else }}
# This will bring problems after k8s 1.24
nodeSelector:
node-role.kubernetes.io/master: ""
{{- end }}

---
apiVersion: apps/v1
Expand Down Expand Up @@ -107,8 +113,14 @@ spec:
tolerations:
- operator: Exists
effect: NoSchedule
{{- if and .Values.webhook .Values.webhook.nodeSelector }}
nodeSelector:
{{- toYaml .Values.webhook.nodeSelector | trim | nindent 8 }}
{{- else }}
# This will bring problems after k8s 1.24
nodeSelector:
node-role.kubernetes.io/master: ""
{{- end }}
priorityClassName: system-cluster-critical
serviceAccountName: hybridnet
hostNetwork: true
Expand Down Expand Up @@ -169,13 +181,20 @@ spec:
scheduler.alpha.kubernetes.io/critical-pod: ''
cluster-autoscaler.kubernetes.io/safe-to-evict: 'true'
spec:
{{- if and .Values.typha .Values.typha.nodeSelector }}
nodeSelector:
{{- toYaml .Values.typha.nodeSelector | trim | nindent 8 }}
{{- else }}
nodeSelector:
beta.kubernetes.io/os: linux
{{- end }}
hostNetwork: true
tolerations:
# Mark the pod as a critical add-on for rescheduling.
- key: CriticalAddonsOnly
operator: Exists
- effect: NoSchedule
operator: Exists
# Since Calico can't network a pod until Typha is up, we need to run Typha itself
# as a host-networked pod.
serviceAccountName: hybridnet
Expand Down Expand Up @@ -224,7 +243,7 @@ spec:
value: "{{ .Values.typha.serverPort }}"
{{- if and .Values.typha .Values.typha.resources }}
resources:
{{- toYaml .Values.typha.resources | trim | nindent 12 }}
{{- toYaml .Values.typha.resources | trim | nindent 12 }}
{{- end }}
livenessProbe:
httpGet:
Expand Down
6 changes: 6 additions & 0 deletions charts/hybridnet/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ manager:
# -- The port of manager to listen on for prometheus metrics
metricsPort: 9899

nodeSelector: {}


webhook:
# -- Only the pods match the additionalPodMatchExpressions will be validate by hybridnet webhook.
Expand All @@ -61,6 +63,8 @@ webhook:
# cpu: 100m
# memory: 512Mi

nodeSelector: {}

daemon:
# -- Whether enable the felix components for NetworkPolicy.
enableFelixPolicy: true
Expand Down Expand Up @@ -147,6 +151,8 @@ typha:
# cpu: 100m
# memory: 128Mi

nodeSelector: {}

# -- Whether pod IP of stateful workloads will be retained by default. true or false
## Ref: https://github.com/alibaba/hybridnet/wiki/Static-pod-ip-addresses-for-StatefulSet
defaultIPRetain: true
Expand Down

0 comments on commit b38108d

Please sign in to comment.