-
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
8ebcf13
commit 8cd1b27
Showing
9 changed files
with
171 additions
and
4 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
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
20 changes: 20 additions & 0 deletions
20
tests/golden/l2-announcement/cilium/cilium/40_l2_announcement_policies.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,20 @@ | ||
apiVersion: cilium.io/v2alpha1 | ||
kind: CiliumL2AnnouncementPolicy | ||
metadata: | ||
annotations: | ||
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true,Prune=false | ||
labels: | ||
name: color-blue | ||
name: color-blue | ||
spec: | ||
externalIPs: true | ||
interfaces: | ||
- ^eth[0-9]+ | ||
loadBalancerIPs: true | ||
nodeSelector: | ||
matchExpressions: | ||
- key: node-role.kubernetes.io/control-plane | ||
operator: DoesNotExist | ||
serviceSelector: | ||
matchLabels: | ||
color: blue |
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 |
---|---|---|
@@ -1,3 +1,23 @@ | ||
# Overwrite parameters here | ||
parameters: | ||
cilium: | ||
cilium_helm_values: | ||
k8sClientRateLimit: | ||
qps: 35 | ||
burst: 45 | ||
|
||
# parameters: {...} | ||
l2_announcements: | ||
enabled: true | ||
policies: | ||
color_blue: | ||
spec: | ||
serviceSelector: | ||
matchLabels: | ||
color: blue | ||
nodeSelector: | ||
matchExpressions: | ||
- key: node-role.kubernetes.io/control-plane | ||
operator: DoesNotExist | ||
interfaces: | ||
- ^eth[0-9]+ | ||
externalIPs: true | ||
loadBalancerIPs: true |