ARTIFACTORY: How to pass username/password to create a new admin user during the installation as a secret in helm
In some scenarios, you would like to pass the username/password to create a new admin user during the installation of Artifactory as a secret. You can achieve this by following the below steps.
Step 1: Create a secret by specifying the username and password of the admin user as below.
kubectl create secret generic art-creds --from-literal=bootstrap.creds='admin@127.0.0.1=Password1*'
Step 2: Pass the secret in the values.yaml as below.
artifactory:
node:
replicaCount: 2
masterKeySecretName: my-masterkey-secret
joinKeySecretName: my-joinkey-secret
license:
secret: artifactory-cluster-license
dataKey: art.lic
admin:
secret: art-creds
dataKey: bootstrap.creds
postgresql:
postgresqlPassword: Password@123
databaseUpgradeReady: true
unifiedUpgradeAllowed: true
nginx:
enabled: true
Step 3: Perform the helm upgrade and you should see the below log entry in the access-service.log.
2023-05-23T15:54:57.281Z [jfac ] [INFO ] [afd244c0d46701b5] [a.s.b.AccessAdminBootstrap:166] [Catalina-utility-1 ] - [ACCESS BOOTSTRAP] Create admin user 'admin'