@@ -39,6 +39,19 @@ public class InitializeDomainOnPV {
3939 + " proceeding with the domain creation. Defaults to true." )
4040 Boolean waitForPvcToBind ;
4141
42+ /** Whether to run the domain initialization init container in the introspector job as root. Default is false. */
43+ @ ApiModelProperty ("Specifies whether the operator will run the domain initialization init container in the "
44+ + "introspector job as root. This may be needed in some environments to create the domain home directory on PV."
45+ + " Defaults to false." )
46+ Boolean runDomainInitContainerAsRoot ;
47+
48+ /** Whether to set the default 'fsGroup' in pod security context. Default is true. */
49+ @ ApiModelProperty ("Specifies whether the operator will set the default 'fsGroup' in the introspector job pod"
50+ + " security context. This is needed to create the domain home directory on PV in some environments."
51+ + " If the 'fsGroup' is specified as part of 'spec.introspector.serverPod.podSecurityContext', then the operator"
52+ + " will use that 'fsGroup' instead of the default 'fsGroup'. Defaults to true." )
53+ Boolean setDefaultSecurityContextFsGroup ;
54+
4255 public PersistentVolume getPersistentVolume () {
4356 return persistentVolume ;
4457 }
@@ -75,6 +88,24 @@ public InitializeDomainOnPV waitForPvcToBind(Boolean waitForPvcToBind) {
7588 return this ;
7689 }
7790
91+ public Boolean getRunDomainInitContainerAsRoot () {
92+ return Optional .ofNullable (runDomainInitContainerAsRoot ).orElse (false );
93+ }
94+
95+ public InitializeDomainOnPV runInitContainerAsRoot (Boolean runInitContainerAsRoot ) {
96+ this .runDomainInitContainerAsRoot = runInitContainerAsRoot ;
97+ return this ;
98+ }
99+
100+ public Boolean getSetDefaultSecurityContextFsGroup () {
101+ return Optional .ofNullable (setDefaultSecurityContextFsGroup ).orElse (true );
102+ }
103+
104+ public InitializeDomainOnPV setDefaultFsGroup (Boolean setDefaultFsGroup ) {
105+ this .setDefaultSecurityContextFsGroup = setDefaultFsGroup ;
106+ return this ;
107+ }
108+
78109 @ Override
79110 public String toString () {
80111 ToStringBuilder builder =
0 commit comments