Applying plugins using secrets

ARTIFACTORY: How to apply user plugins to Helm installation of Artifactory

AuthorFullName__c
Rasul Imanov
articleNumber
000005643
ft:sourceType
Salesforce
FirstPublishedDate
2023-03-23T19:28:58Z
lastModifiedDate
2023-03-23T19:28:58Z
VersionNumber
1
To create a secret with a single user plugin, run the following command:
kubectl create secret generic archive-old-artifacts --from-file=archiveOldArtifacts.groovy --namespace=artifactory

To create a secret with a single user plugin with a configuration file, run the following command:
kubectl create secret generic webhook --from-file=webhook.groovy --from-file=webhook.config.json.sample --namespace=artifactory

Once you have created the secrets, you can use them in Artifactory. To do this, you need to create a plugin-values.yaml file that contains the plugin secret names and other required information. Here is an example:
artifactory:
  userPluginSecrets:
    - archive-old-artifacts
    - webhook
    - cleanup
  copyOnEveryStartup:
    - source: /artifactory_bootstrap/plugins/*
      target: etc/artifactory/plugins/

The userPluginSecrets section lists the names of the secrets that you created earlier. The copyOnEveryStartup section specifies the files that should be copied over to the appropriate directory every time the Artifactory pod is restarted.

You can now pass the plugins.yaml file you created to the Helm install command to deploy Artifactory with user plugins as follows.
helm upgrade --install artifactory jfrog/artifactory --namespace artifactory -f plugin-values.yaml