-
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.
Merge pull request #119 from projectsyn/feat/disable-kube-proxy
Manage OpenShift's kube-proxy deployment based on the value of `kubeProxyReplacement`
- Loading branch information
Showing
34 changed files
with
1,343 additions
and
17 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
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
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,30 @@ | ||
local kap = import 'lib/kapitan.libjsonnet'; | ||
local kube = import 'lib/kube.libjsonnet'; | ||
local po = import 'lib/patch-operator.libsonnet'; | ||
local util = import 'util.libsonnet'; | ||
|
||
local inv = kap.inventory(); | ||
local params = inv.parameters.cilium; | ||
|
||
local fullReplacement = std.member( | ||
[ 'strict', 'true' ], | ||
params.cilium_helm_values.kubeProxyReplacement | ||
); | ||
|
||
|
||
local target = kube._Object('operator.openshift.io/v1', 'Network', 'cluster'); | ||
|
||
local template = { | ||
spec: { | ||
deployKubeProxy: !fullReplacement, | ||
}, | ||
}; | ||
|
||
local patch = po.Patch(target, template, patchstrategy='application/merge-patch+json'); | ||
|
||
if util.isOpenshift then | ||
{ | ||
'99_networkoperator_kube_proxy_patch': patch, | ||
} | ||
else | ||
{} |
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
Empty file.
11 changes: 11 additions & 0 deletions
11
...en/kubeproxyreplacement-strict/cilium/cilium/01_cilium_helmchart/00_cilium_namespace.yaml
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,11 @@ | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
annotations: | ||
openshift.io/node-selector: '' | ||
labels: | ||
name: cilium | ||
openshift.io/cluster-logging: 'true' | ||
openshift.io/cluster-monitoring: 'true' | ||
openshift.io/run-level: '0' | ||
name: cilium |
104 changes: 104 additions & 0 deletions
104
...t-strict/cilium/cilium/01_cilium_helmchart/cilium/templates/cilium-agent/clusterrole.yaml
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,104 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
labels: | ||
app.kubernetes.io/part-of: cilium | ||
name: cilium | ||
rules: | ||
- apiGroups: | ||
- networking.k8s.io | ||
resources: | ||
- networkpolicies | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
- apiGroups: | ||
- discovery.k8s.io | ||
resources: | ||
- endpointslices | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
- apiGroups: | ||
- '' | ||
resources: | ||
- namespaces | ||
- services | ||
- pods | ||
- endpoints | ||
- nodes | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
- apiGroups: | ||
- apiextensions.k8s.io | ||
resources: | ||
- customresourcedefinitions | ||
verbs: | ||
- list | ||
- watch | ||
- get | ||
- apiGroups: | ||
- cilium.io | ||
resources: | ||
- ciliumloadbalancerippools | ||
- ciliumbgppeeringpolicies | ||
- ciliumclusterwideenvoyconfigs | ||
- ciliumclusterwidenetworkpolicies | ||
- ciliumegressgatewaypolicies | ||
- ciliumendpoints | ||
- ciliumendpointslices | ||
- ciliumenvoyconfigs | ||
- ciliumidentities | ||
- ciliumlocalredirectpolicies | ||
- ciliumnetworkpolicies | ||
- ciliumnodes | ||
- ciliumnodeconfigs | ||
- ciliumcidrgroups | ||
- ciliuml2announcementpolicies | ||
- ciliumpodippools | ||
verbs: | ||
- list | ||
- watch | ||
- apiGroups: | ||
- cilium.io | ||
resources: | ||
- ciliumidentities | ||
- ciliumendpoints | ||
- ciliumnodes | ||
verbs: | ||
- create | ||
- apiGroups: | ||
- cilium.io | ||
resources: | ||
- ciliumidentities | ||
verbs: | ||
- update | ||
- apiGroups: | ||
- cilium.io | ||
resources: | ||
- ciliumendpoints | ||
verbs: | ||
- delete | ||
- get | ||
- apiGroups: | ||
- cilium.io | ||
resources: | ||
- ciliumnodes | ||
- ciliumnodes/status | ||
verbs: | ||
- get | ||
- update | ||
- apiGroups: | ||
- cilium.io | ||
resources: | ||
- ciliumnetworkpolicies/status | ||
- ciliumclusterwidenetworkpolicies/status | ||
- ciliumendpoints/status | ||
- ciliumendpoints | ||
- ciliuml2announcementpolicies/status | ||
verbs: | ||
- patch |
14 changes: 14 additions & 0 deletions
14
...t/cilium/cilium/01_cilium_helmchart/cilium/templates/cilium-agent/clusterrolebinding.yaml
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,14 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
labels: | ||
app.kubernetes.io/part-of: cilium | ||
name: cilium | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: cilium | ||
subjects: | ||
- kind: ServiceAccount | ||
name: cilium | ||
namespace: cilium |
Oops, something went wrong.