Extract Domain Resource - Add option to NOT include imagePullSecrets
Techinica opened this issue · 4 comments
As per the documentation, the extractDomainResource command will add an "imagePullSecrets" section should the "imagePullPolicy" be set to anything other than Never.
imagePullSecrets: - name: '--FIX ME--'
This script thus explicitly assumes that an imagePullSecret is required to pull the domain image, however in many cases, such as with Azure Container Registry - AKS integration, specifying a secret is not required for the private registry. As such we currently have to generate the domain resource with "Never" as the imagePullPolicy to avoid having this section added, only then have to string replace "Never" with our desired value of "IfNotPresent".
Ideally the adding of the imagePullSecrets should be reconsidered, or an option either within the yaml or as a command line flag to avoid doing this should be added.
If you leave the imagePullSecrets in your model, but empty, and put in your ifNotPresent policy, it will put in an empty list. You can remove this field with a sed command such as sed -e ‘/^imagePullSecret/,+1 s/^/#/’
Will not fix, please use the workaround for now.
@Techinica - with the latest WDT release 2.0, there is an option you can use to avoid the automatic addition of the ImagePullSecrets
value. In your model, specify ImagePullSecrets
with an empty list, such as:
imagePullPolicy: IfNotPresent
imagePullSecrets: []
this will propogate to the domain resource file as:
imagePullPolicy: IfNotPresent
imagePullSecrets: []
There are some other changes to the kubernetes
section with WDT 2.0 that you may need to adjust for:
https://oracle.github.io/weblogic-deploy-tooling/release-notes/