Skip to content

Commit

Permalink
linux-bridge: use w/ openshift required-scc annotation
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel Duarte Barroso <[email protected]>
  • Loading branch information
maiqueb committed Dec 5, 2024
1 parent 3a61827 commit c6019b7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions data/linux-bridge/002-linux-bridge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,14 @@ spec:
name: kube-cni-linux-bridge-plugin
tier: node
app: cni-plugins
{{ if .EnableSCC }}
annotations:
openshift.io/required-scc: "linux-bridge"
description: LinuxBridge installs 'bridge' CNI on cluster nodes, so it can be later used to attach Pods/VMs to Linux bridges
{{ else }}
annotations:
description: LinuxBridge installs 'bridge' CNI on cluster nodes, so it can be later used to attach Pods/VMs to Linux bridges
{{ end }}
spec:
{{ if .EnableSCC }}
serviceAccountName: linux-bridge
Expand Down
1 change: 1 addition & 0 deletions data/linux-bridge/003-bridge-marker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ spec:
name: bridge-marker
annotations:
description: Bridge marker exposes network bridges available on nodes as node resources
openshift.io/required-scc: "bridge-marker"
spec:
serviceAccountName: bridge-marker
hostNetwork: true
Expand Down
1 change: 1 addition & 0 deletions hack/components/bump-bridge-marker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ function __parametize_by_object() {
yaml-utils::update_param ${f} spec.template.spec.containers[0].imagePullPolicy '{{ .ImagePullPolicy }}'
yaml-utils::update_param ${f} spec.template.spec.nodeSelector '{{ toYaml .Placement.NodeSelector | nindent 8 }}'
yaml-utils::set_param ${f} spec.template.spec.affinity '{{ toYaml .Placement.Affinity | nindent 8 }}'
yaml-utils::set_param ${f} 'spec.template.metadata.annotations."openshift.io/required-scc"' '"bridge-marker"'
yaml-utils::update_param ${f} spec.template.spec.tolerations '{{ toYaml .Placement.Tolerations | nindent 8 }}'
yaml-utils::remove_single_quotes_from_yaml ${f}
;;
Expand Down

0 comments on commit c6019b7

Please sign in to comment.