Skip to content

Commit

Permalink
Merge pull request kosmos-io#288 from OrangeBao/fix_iptables
Browse files Browse the repository at this point in the history
fix: cannot create iptable chain in some environment
  • Loading branch information
kosmos-robot authored Nov 24, 2023
2 parents 99bf98a + f9c51a3 commit e923865
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
15 changes: 15 additions & 0 deletions deploy/clusterlink-agent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ spec:
- mountPath: /etc/clusterlink/kubeconfig
name: proxy-config
readOnly: true
- mountPath: /run/xtables.lock
name: iptableslock
readOnly: false
- mountPath: /lib/modules
name: lib-modules
readOnly: true
terminationGracePeriodSeconds: 30
securityContext:
privileged: true
Expand All @@ -55,3 +61,12 @@ spec:
configMap:
defaultMode: 420
name: proxy-config
- hostPath:
path: /run/xtables.lock
type: FileOrCreate
name: iptableslock
- name: lib-modules
hostPath:
path: /lib/modules


14 changes: 13 additions & 1 deletion pkg/operator/clusterlink/agent/manifests.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,25 @@ spec:
- mountPath: /etc/clusterlink
name: proxy-config
readOnly: true
- mountPath: /run/xtables.lock
name: iptableslock
readOnly: false
- mountPath: /lib/modules
name: lib-modules
readOnly: true
terminationGracePeriodSeconds: 30
hostNetwork: true
volumes:
- name: proxy-config
secret:
secretName: {{ .ProxyConfigMapName }}
- hostPath:
path: /run/xtables.lock
type: FileOrCreate
name: iptableslock
- name: lib-modules
hostPath:
path: /lib/modules
`

// DaemonSetReplace is a struct to help to concrete
Expand Down

0 comments on commit e923865

Please sign in to comment.