Skip to content

Commit 0cf3674

Browse files
authored
Merge pull request #18287 from hakman/automated-cherry-pick-of-#18285-upstream-release-1.34
Automated cherry pick of #18285: cilium: allow setting arbitrary cilium-config entries
2 parents c4637a0 + 9eb9aa2 commit 0cf3674

10 files changed

Lines changed: 49 additions & 2 deletions

File tree

k8s/crds/kops.k8s.io_clusters.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5611,6 +5611,13 @@ spec:
56115611
The cluster is operated by cilium-etcd-operator.
56125612
Default: false
56135613
type: boolean
5614+
extraConfig:
5615+
additionalProperties:
5616+
type: string
5617+
description: |-
5618+
ExtraConfig is appended to the cilium-config ConfigMap. Keys here override any value
5619+
rendered by kops. All values must be strings (e.g. "true", not true).
5620+
type: object
56145621
gatewayAPI:
56155622
description: GatewayAPI specifies the configuration for Cilium
56165623
Gateway API settings.

pkg/apis/kops/networking.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,10 @@ type CiliumNetworkingSpec struct {
528528

529529
// GatewayAPI specifies the configuration for Cilium Gateway API settings.
530530
GatewayAPI *CiliumGatewayAPISpec `json:"gatewayAPI,omitempty"`
531+
532+
// ExtraConfig is appended to the cilium-config ConfigMap. Keys here override any value
533+
// rendered by kops. All values must be strings (e.g. "true", not true).
534+
ExtraConfig map[string]string `json:"extraConfig,omitempty"`
531535
}
532536

533537
// CiliumIngressSpec configures Cilium Ingress settings.

pkg/apis/kops/v1alpha2/networking.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -645,6 +645,10 @@ type CiliumNetworkingSpec struct {
645645

646646
// GatewayAPI specifies the configuration for Cilium Gateway API settings.
647647
GatewayAPI *CiliumGatewayAPISpec `json:"gatewayAPI,omitempty"`
648+
649+
// ExtraConfig is appended to the cilium-config ConfigMap. Keys here override any value
650+
// rendered by kops. All values must be strings (e.g. "true", not true).
651+
ExtraConfig map[string]string `json:"extraConfig,omitempty"`
648652
}
649653

650654
// CiliumIngressSpec configures Cilium Ingress settings.

pkg/apis/kops/v1alpha2/zz_generated.conversion.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/apis/kops/v1alpha2/zz_generated.deepcopy.go

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/apis/kops/v1alpha3/networking.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,10 @@ type CiliumNetworkingSpec struct {
476476

477477
// GatewayAPI specifies the configuration for Cilium Gateway API settings.
478478
GatewayAPI *CiliumGatewayAPISpec `json:"gatewayAPI,omitempty"`
479+
480+
// ExtraConfig is appended to the cilium-config ConfigMap. Keys here override any value
481+
// rendered by kops. All values must be strings (e.g. "true", not true).
482+
ExtraConfig map[string]string `json:"extraConfig,omitempty"`
479483
}
480484

481485
// CiliumIngressSpec configures Cilium Ingress settings.

pkg/apis/kops/v1alpha3/zz_generated.conversion.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/apis/kops/v1alpha3/zz_generated.deepcopy.go

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/apis/kops/zz_generated.deepcopy.go

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

upup/models/cloudup/resources/addons/networking.cilium.io/k8s-1.16-v1.15.yaml.template

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -473,8 +473,11 @@ data:
473473
enable-non-default-deny-policies: "true"
474474
enable-source-ip-verification: "true"
475475

476-
# Extra config allows adding arbitrary properties to the cilium config.
477-
# By putting it at the end of the ConfigMap, it's also possible to override existing properties.
476+
# Extra config allows adding arbitrary properties to the cilium config.
477+
# By putting it at the end of the ConfigMap, it's also possible to override existing properties.
478+
{{- range $k, $v := .ExtraConfig }}
479+
{{ $k }}: {{ printf "%q" $v }}
480+
{{- end }}
478481

479482
{{ if WithDefaultBool .Hubble.Enabled false }}
480483
---

0 commit comments

Comments
 (0)