Summary
The current setup.sh always downloads the jfrog-credential-provider binary via curl from JFROG_CREDENTIAL_PROVIDER_BINARY_URL. In restricted environments (no/limited egress, private endpoints, authenticated artifact stores), this is brittle. It would be nice to upgrade the script/chart to support:
- Using a pre-baked/local binary path (skip download entirely)
- Using a custom download command/template (support auth + non-HTTP sources like S3, Artifactory with access tokens, etc.)
Motivation
- Clusters with restrictive egress rules often cannot reach public URLs.
- Many orgs pre-bake required binaries into node images or ship them via internal artifact stores.
- Authenticated downloads (e.g., Artifactory requiring API key/token, AWS S3 presigned URLs, private endpoints) can’t be expressed cleanly with the current hardcoded
curl -L -f.
Current Behavior
setup.sh builds an arch-specific URL and runs:
curl -L -f -o ${KUBELET_MOUNT_PATH}${JFROG_CREDENTIAL_PROVIDER_BINARY_DIR}/{{ .name }} "${JFROG_CREDENTIAL_PROVIDER_BINARY_URL}"
- If download fails, it sleeps and exits to trigger pod restart.
Proposed Changes
1) Add “local/pre-baked binary” option
Allow specifying a local source path (inside the container image or host-mounted path) and copy it into ${JFROG_CREDENTIAL_PROVIDER_BINARY_DIR}/{{ .name }}.
New values (example):
values.yaml
binary.source: download|local
binary.localPath: /opt/jfrog/jfrog-credential-provider (inside the injector container), or optionally from a mounted volume
binary.skipChmod: false (optional)
Behavior:
- If
binary.source == local:
- Validate file exists and is executable (or chmod it)
- Copy to target location
- Skip all URL/arch logic and download flow
2) Add “custom download command” option
Allow users to provide a full download command template used to fetch the binary.
New values (example):
binary.downloadCommand: >
curl -L -H "Authorization: Bearer ${ARTIFACT_TOKEN}" -f -o "{{TARGET}}" "{{URL}}"
- Alternative examples:
- S3:
aws s3 cp "s3://my-bucket/path/{{NAME}}-{{ARCH}}" "{{TARGET}}"
- Artifactory CLI:
jfrog rt dl ...
- Curl with mTLS, proxy, custom CA bundle, etc.
Behavior:
- If
binary.downloadCommand is set, use it instead of the hardcoded curl invocation.
- Provide well-defined placeholders/variables:
{{TARGET}} → ${KUBELET_MOUNT_PATH}${JFROG_CREDENTIAL_PROVIDER_BINARY_DIR}/{{ .name }}
{{URL}} → resolved URL (including arch suffix if applicable)
{{ARCH}} / {{ARCH_SUFFIX}}
{{NAME}} → {{ .name }}
- Keep existing retry/sleep/exit behavior on failure.
Backwards Compatibility
- Default behavior remains unchanged if:
binary.source is not set (defaults to download)
binary.downloadCommand is not set (defaults to current curl -L -f ...)
Implementation Notes (Suggested)
- Extend Helm values + template to render new env vars into the setup container:
JFROG_CREDENTIAL_PROVIDER_BINARY_SOURCE
JFROG_CREDENTIAL_PROVIDER_BINARY_LOCAL_PATH
JFROG_CREDENTIAL_PROVIDER_DOWNLOAD_COMMAND
- Update
setup.sh:
- Compute
TARGET_PATH once
- Branch:
- local copy flow
- download flow (either custom command or curl)
Example Use Cases
- Air-gapped / no egress: binary shipped in image, set
binary.source=local.
- Private Artifactory with token: set
binary.downloadCommand using Authorization header.
- S3 bucket with IAM: set
binary.downloadCommand using aws s3 cp.
Summary
The current
setup.shalways downloads thejfrog-credential-providerbinary viacurlfromJFROG_CREDENTIAL_PROVIDER_BINARY_URL. In restricted environments (no/limited egress, private endpoints, authenticated artifact stores), this is brittle. It would be nice to upgrade the script/chart to support:Motivation
curl -L -f.Current Behavior
setup.shbuilds an arch-specific URL and runs:curl -L -f -o ${KUBELET_MOUNT_PATH}${JFROG_CREDENTIAL_PROVIDER_BINARY_DIR}/{{ .name }} "${JFROG_CREDENTIAL_PROVIDER_BINARY_URL}"Proposed Changes
1) Add “local/pre-baked binary” option
Allow specifying a local source path (inside the container image or host-mounted path) and copy it into
${JFROG_CREDENTIAL_PROVIDER_BINARY_DIR}/{{ .name }}.New values (example):
values.yamlbinary.source: download|localbinary.localPath: /opt/jfrog/jfrog-credential-provider(inside the injector container), or optionally from a mounted volumebinary.skipChmod: false(optional)Behavior:
binary.source == local:2) Add “custom download command” option
Allow users to provide a full download command template used to fetch the binary.
New values (example):
binary.downloadCommand: >curl -L -H "Authorization: Bearer ${ARTIFACT_TOKEN}" -f -o "{{TARGET}}" "{{URL}}"aws s3 cp "s3://my-bucket/path/{{NAME}}-{{ARCH}}" "{{TARGET}}"jfrog rt dl ...Behavior:
binary.downloadCommandis set, use it instead of the hardcoded curl invocation.{{TARGET}}→${KUBELET_MOUNT_PATH}${JFROG_CREDENTIAL_PROVIDER_BINARY_DIR}/{{ .name }}{{URL}}→ resolved URL (including arch suffix if applicable){{ARCH}}/{{ARCH_SUFFIX}}{{NAME}}→{{ .name }}Backwards Compatibility
binary.sourceis not set (defaults todownload)binary.downloadCommandis not set (defaults to currentcurl -L -f ...)Implementation Notes (Suggested)
JFROG_CREDENTIAL_PROVIDER_BINARY_SOURCEJFROG_CREDENTIAL_PROVIDER_BINARY_LOCAL_PATHJFROG_CREDENTIAL_PROVIDER_DOWNLOAD_COMMANDsetup.sh:TARGET_PATHonceExample Use Cases
binary.source=local.binary.downloadCommandusingAuthorizationheader.binary.downloadCommandusingaws s3 cp.