Skip to content
This repository was archived by the owner on Mar 26, 2025. It is now read-only.

Commit 78055db

Browse files
authored
feat(api,kcl): added envoyCfg.PodSecurityContext (#956)
RHOS requires setting some fields which needed propagation.
1 parent 12af3cd commit 78055db

File tree

3 files changed

+791
-0
lines changed

3 files changed

+791
-0
lines changed

api/v1beta1/kafkacluster_types.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,10 @@ type EnvoyConfig struct {
361361
// EnableHealthCheckHttp10 is a toggle for adding HTTP1.0 support to Envoy health-check, default false
362362
// +optional
363363
EnableHealthCheckHttp10 bool `json:"enableHealthCheckHttp10,omitempty"`
364+
365+
// PodSecurityContext holds pod-level security attributes and common container
366+
// settings for the Envoy pods.
367+
PodSecurityContext *corev1.PodSecurityContext `json:"podSecurityContext,omitempty"`
364368
}
365369

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

857+
// GetPodSecurityContext returns the security context for the envoy deployment podspec.
858+
func (eConfig *EnvoyConfig) GetPodSecurityContext() *corev1.PodSecurityContext {
859+
if eConfig == nil {
860+
return nil
861+
}
862+
863+
return eConfig.PodSecurityContext
864+
}
865+
853866
// GetPriorityClassName returns the priority class name for envoy
854867
func (eConfig *EnvoyConfig) GetPriorityClassName() string {
855868
return eConfig.PriorityClassName

0 commit comments

Comments
 (0)