Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Cilium Ingress #15795

Merged
merged 4 commits into from
Sep 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions k8s/crds/kops.k8s.io_clusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5033,6 +5033,39 @@ spec:
description: 'IdentityChangeGracePeriod specifies the duration
to wait before using a changed identity. Default: 5s'
type: string
ingress:
description: Ingress specifies the configuration for Cilium
Ingress settings.
properties:
defaultLoadBalancerMode:
description: 'DefaultLoadBalancerMode specifies the default
load balancer mode. Possible values: ''shared'' or ''dedicated''
Default: dedicated'
type: string
enableSecretsSync:
description: 'EnableSecretsSync specifies whether synchronization
of secrets is enabled. Default: true'
type: boolean
enabled:
description: Enabled specifies whether Cilium Ingress
is enabled.
type: boolean
enforceHttps:
description: 'EnforceHttps specifies whether HTTPS enforcement
is enabled for Ingress traffic. Default: true'
type: boolean
loadBalancerAnnotationPrefixes:
description: 'LoadBalancerAnnotationPrefixes specifies
annotation prefixes for Load Balancer configuration.
Default: "service.beta.kubernetes.io service.kubernetes.io
cloud.google.com"'
type: string
sharedLoadBalancerServiceName:
description: 'SharedLoadBalancerServiceName specifies
the name of the shared load balancer service. Default:
cilium-ingress'
type: string
type: object
ipam:
description: 'IPAM specifies the IP address allocation mode
to use. Possible values are "crd" and "eni". "eni" will
Expand Down
30 changes: 30 additions & 0 deletions pkg/apis/kops/networking.go
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,36 @@ type CiliumNetworkingSpec struct {

// EnableServiceTopology determine if cilium should use topology aware hints.
EnableServiceTopology bool `json:"enableServiceTopology,omitempty"`

// Ingress specifies the configuration for Cilium Ingress settings.
Ingress *CiliumIngressSpec `json:"ingress,omitempty"`
}

// CiliumIngressSpec configures Cilium Ingress settings.
type CiliumIngressSpec struct {
// Enabled specifies whether Cilium Ingress is enabled.
Enabled *bool `json:"enabled,omitempty"`

// EnforceHttps specifies whether HTTPS enforcement is enabled for Ingress traffic.
// Default: true
EnforceHttps *bool `json:"enforceHttps,omitempty"`

// EnableSecretsSync specifies whether synchronization of secrets is enabled.
// Default: true
EnableSecretsSync *bool `json:"enableSecretsSync,omitempty"`

// LoadBalancerAnnotationPrefixes specifies annotation prefixes for Load Balancer configuration.
// Default: "service.beta.kubernetes.io service.kubernetes.io cloud.google.com"
LoadBalancerAnnotationPrefixes string `json:"loadBalancerAnnotationPrefixes,omitempty"`

// DefaultLoadBalancerMode specifies the default load balancer mode.
// Possible values: 'shared' or 'dedicated'
// Default: dedicated
DefaultLoadBalancerMode string `json:"defaultLoadBalancerMode,omitempty"`

// SharedLoadBalancerServiceName specifies the name of the shared load balancer service.
// Default: cilium-ingress
SharedLoadBalancerServiceName string `json:"sharedLoadBalancerServiceName,omitempty"`
}

// HubbleSpec configures the Hubble service on the Cilium agent.
Expand Down
30 changes: 30 additions & 0 deletions pkg/apis/kops/v1alpha2/networking.go
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,36 @@ type CiliumNetworkingSpec struct {

// EnableServiceTopology determine if cilium should use topology aware hints.
EnableServiceTopology bool `json:"enableServiceTopology,omitempty"`

// Ingress specifies the configuration for Cilium Ingress settings.
Ingress *CiliumIngressSpec `json:"ingress,omitempty"`
}

// CiliumIngressSpec configures Cilium Ingress settings.
type CiliumIngressSpec struct {
// Enabled specifies whether Cilium Ingress is enabled.
Enabled *bool `json:"enabled,omitempty"`

// EnforceHttps specifies whether HTTPS enforcement is enabled for Ingress traffic.
// Default: true
EnforceHttps *bool `json:"enforceHttps,omitempty"`

// EnableSecretsSync specifies whether synchronization of secrets is enabled.
// Default: true
EnableSecretsSync *bool `json:"enableSecretsSync,omitempty"`

// LoadBalancerAnnotationPrefixes specifies annotation prefixes for Load Balancer configuration.
// Default: "service.beta.kubernetes.io service.kubernetes.io cloud.google.com"
LoadBalancerAnnotationPrefixes string `json:"loadBalancerAnnotationPrefixes,omitempty"`

// DefaultLoadBalancerMode specifies the default load balancer mode.
// Possible values: 'shared' or 'dedicated'
// Default: dedicated
DefaultLoadBalancerMode string `json:"defaultLoadBalancerMode,omitempty"`

// SharedLoadBalancerServiceName specifies the name of the shared load balancer service.
// Default: cilium-ingress
SharedLoadBalancerServiceName string `json:"sharedLoadBalancerServiceName,omitempty"`
}

// HubbleSpec configures the Hubble service on the Cilium agent.
Expand Down
58 changes: 58 additions & 0 deletions pkg/apis/kops/v1alpha2/zz_generated.conversion.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 36 additions & 0 deletions pkg/apis/kops/v1alpha2/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions pkg/apis/kops/v1alpha3/networking.go
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,36 @@ type CiliumNetworkingSpec struct {

// EnableServiceTopology determine if cilium should use topology aware hints.
EnableServiceTopology bool `json:"enableServiceTopology,omitempty"`

// Ingress specifies the configuration for Cilium Ingress settings.
Ingress *CiliumIngressSpec `json:"ingress,omitempty"`
}

// CiliumIngressSpec configures Cilium Ingress settings.
type CiliumIngressSpec struct {
// Enabled specifies whether Cilium Ingress is enabled.
Enabled *bool `json:"enabled,omitempty"`

// EnforceHttps specifies whether HTTPS enforcement is enabled for Ingress traffic.
// Default: true
EnforceHttps *bool `json:"enforceHttps,omitempty"`

// EnableSecretsSync specifies whether synchronization of secrets is enabled.
// Default: true
EnableSecretsSync *bool `json:"enableSecretsSync,omitempty"`

// LoadBalancerAnnotationPrefixes specifies annotation prefixes for Load Balancer configuration.
// Default: "service.beta.kubernetes.io service.kubernetes.io cloud.google.com"
LoadBalancerAnnotationPrefixes string `json:"loadBalancerAnnotationPrefixes,omitempty"`

// DefaultLoadBalancerMode specifies the default load balancer mode.
// Possible values: 'shared' or 'dedicated'
// Default: dedicated
DefaultLoadBalancerMode string `json:"defaultLoadBalancerMode,omitempty"`

// SharedLoadBalancerServiceName specifies the name of the shared load balancer service.
// Default: cilium-ingress
SharedLoadBalancerServiceName string `json:"sharedLoadBalancerServiceName,omitempty"`
}

// HubbleSpec configures the Hubble service on the Cilium agent.
Expand Down
58 changes: 58 additions & 0 deletions pkg/apis/kops/v1alpha3/zz_generated.conversion.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading