Skip to content

Commit

Permalink
feat(api,kcl): added envoyCfg.PodSecurityContext
Browse files Browse the repository at this point in the history
RHOS requires setting some fields which needed
propagation.
  • Loading branch information
pregnor committed Apr 4, 2023
1 parent 12af3cd commit f92ce01
Show file tree
Hide file tree
Showing 3 changed files with 791 additions and 0 deletions.
13 changes: 13 additions & 0 deletions api/v1beta1/kafkacluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,10 @@ type EnvoyConfig struct {
// EnableHealthCheckHttp10 is a toggle for adding HTTP1.0 support to Envoy health-check, default false
// +optional
EnableHealthCheckHttp10 bool `json:"enableHealthCheckHttp10,omitempty"`

// PodSecurityContext holds pod-level security attributes and common container
// settings for the Envoy pods.
PodSecurityContext *corev1.PodSecurityContext `json:"podSecurityContext,omitempty"`
}

// EnvoyCommandLineArgs defines envoy command line arguments
Expand Down Expand Up @@ -850,6 +854,15 @@ func (eConfig *EnvoyConfig) GetTopologySpreadConstaints() []corev1.TopologySprea
return eConfig.TopologySpreadConstraints
}

// GetPodSecurityContext returns the security context for the envoy deployment podspec.
func (eConfig *EnvoyConfig) GetPodSecurityContext() *corev1.PodSecurityContext {
if eConfig == nil {
return nil
}

return eConfig.PodSecurityContext
}

// GetPriorityClassName returns the priority class name for envoy
func (eConfig *EnvoyConfig) GetPriorityClassName() string {
return eConfig.PriorityClassName
Expand Down
Loading

0 comments on commit f92ce01

Please sign in to comment.