-
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.
Support deploying CiliumL2AnnouncementPolicies
L2 Announcements is a feature which makes services visible and reachable on the local area network. This feature is primarily intended for on-premises deployments within networks without BGP based routing.
- Loading branch information
1 parent
42db065
commit f03d7f7
Showing
29 changed files
with
1,507 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
local com = import 'lib/commodore.libjsonnet'; | ||
local kap = import 'lib/kapitan.libjsonnet'; | ||
local kube = import 'lib/kube.libjsonnet'; | ||
|
||
local inv = kap.inventory(); | ||
local params = inv.parameters.cilium; | ||
|
||
local CiliumL2AnnouncementPolicy(name) = | ||
kube._Object('cilium.io/v2alpha1', 'CiliumL2AnnouncementPolicy', name) { | ||
metadata+: { | ||
annotations+: { | ||
'argocd.argoproj.io/sync-options': 'SkipDryRunOnMissingResource=true,Prune=false', | ||
}, | ||
}, | ||
}; | ||
|
||
local policies = com.generateResources( | ||
params.l2_announcements.policies, | ||
CiliumL2AnnouncementPolicy | ||
); | ||
|
||
{ | ||
[if params.l2_announcements.enabled && std.length(params.l2_announcements.policies) > 0 then | ||
'40_l2_announcement_policies']: policies, | ||
} |
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
7 changes: 7 additions & 0 deletions
7
tests/golden/l2-announcement/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,7 @@ | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
annotations: {} | ||
labels: | ||
name: cilium | ||
name: cilium |
118 changes: 118 additions & 0 deletions
118
...uncement/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,118 @@ | ||
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: | ||
- coordination.k8s.io | ||
resources: | ||
- leases | ||
verbs: | ||
- create | ||
- get | ||
- update | ||
- list | ||
- delete | ||
- apiGroups: | ||
- apiextensions.k8s.io | ||
resources: | ||
- customresourcedefinitions | ||
verbs: | ||
- list | ||
- watch | ||
- get | ||
- apiGroups: | ||
- cilium.io | ||
resources: | ||
- ciliumloadbalancerippools | ||
- ciliumbgppeeringpolicies | ||
- ciliumbgpnodeconfigs | ||
- ciliumbgpadvertisements | ||
- ciliumbgppeerconfigs | ||
- 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 | ||
- ciliumbgpnodeconfigs/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.