Add Red Hat OpenShift (on Azure and AWS) support#77
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
|
Evidence that demonstrates success from my test cluster: |
|
Thank you for your contribution and for raising the PR for ROSA, we truly appreciate your effort. We are currently reviewing the PR, and we will get back to you. Thanks again for your contribution! |
michaelryanmcneill
left a comment
There was a problem hiding this comment.
Thanks for the feedback! I'll make some changes and then tag you for a second review.
|
Temporarily moving this to WIP while I work through adding both Azure and AWS support for OCP. This will ensure it is also extensible for GCP in the future (but our implementation of pod identity in GCP is more complicated and will not be covered by this). Plan to complete this tomorrow. |
Signed-off-by: michaelryanmcneill <michael@michaelryanmcneill.com>
4ac6bd2 to
f7b93f2
Compare
|
@RobinDuhan ready for your review of my updated PR. |
|
Thank you for the Azure addition. We are currently reviewing it internally. We truly appreciate your contribution and the effort you put into this enhancement! |
…ons and updating OpenShift documentation Signed-off-by: michaelryanmcneill <michael@michaelryanmcneill.com>
|
All suggestions addressed @oumkale! Ready for final review 👍 |
Signed-off-by: michaelryanmcneill <michael@michaelryanmcneill.com>
Signed-off-by: michaelryanmcneill <michael@michaelryanmcneill.com>
|
@oumkale addressed additional comments and updated the PR summary with changes. Please let me know if you see anything else. |
Summary
Adds support for deploying the JFrog Kubelet Credential Provider on Red Hat OpenShift on AWS and Azure. This includes ROSA and ARO.
Overview
OpenShift ships platform kubelet credential providers on worker nodes (
ecr-credential-provideron AWS,acr-credential-provideron Azure) under/etc/kubernetes/credential-providers/. RHCOS also mounts/usrread-only, which breaks the existing EKS/AKS install paths.This PR adds
platform: openshiftso the chart can:/var/lib/jfrog-credential-provider/bin)/usr/libexec/kubelet-image-credential-provider-plugins/Tested targets: ROSA (HCP and Classic), ARO.
Not in this PR: OpenShift on Google Cloud (requires additional enhancement to support due to implementation of workload identity in OpenShift on Google Cloud).
User-facing changes
New Helm values
platform: openshiftopenshift.grantPrivilegedSCCRoleBindingtosystem:openshift:scc:privilegedfor the injector DaemonSetopenshift.labelNamespacePodSecurityenforce=privilegedandscc.podSecurityLabelSync=falseon release namespace (defaulttrue)openshift.stagingBinaryDir/var/lib/jfrog-credential-provider/bin)openshift.targetBinaryDir/usr/libexec/kubelet-image-credential-provider-plugins)openshift.targetProviderConfigDir/etc/kubernetes/credential-providers)providerConfig[].tokenAttributes.requireServiceAccounttrueon OpenShift)New example values
examples/openshift-aws-projected-sa-values.yaml— ROSA / OpenShift on AWS with IRSAexamples/openshift-azure-projected-sa-values.yaml— ARO / OpenShift on Azure with workload identityDocumentation
OpenShift.md(new) — End-to-end guide: requirements, Helm install, IAM/MI + Artifactory setup, verification, troubleshooting (replaces prior ROSA/ARO split docs)README.md— OpenShift called out in supported distributionsAWS.md/AZURE.md/debug.md— Cross-links and OpenShift path noteshelm/CHANGELOG.md— Unreleased section documents chart changesManual test automation
Removed from this PR at the request of the maintainers. Will be submitting a follow up PR once this PR merges.
openshift-tests/openshift-test-plan-aws.sh— Phases 0–8: prerequisites, IAM role + SA, Artifactory IAM mapping, Helm install, node verification, positive/negative pulls, optional cleanupopenshift-tests/openshift-test-plan-azure.sh— Same structure for Azure (managed identity, federated credential, Artifactory OIDC)openshift-tests/README-openshift-testing.md— How to run tests and common issuesHelm chart changes
Installer (
configmap-setup.yaml)isOpenShiftStaging(AWS or Azure only)ecr-credential-provider.yaml(AWS) oracr-credential-provider.yaml(Azure)cloud_providerenv passed toadd-provider-config(metadata detection from DaemonSet network often fails on OpenShift)add-provider-config)Provider config (
configmap-provider.yaml,_aws-provider-config.tpl)tokenAttributes(sts.amazonaws.com,requireServiceAccount,eks.amazonaws.com/role-arn,JFrogExchange)aws_role_nameenv when IRSA-only (awsOmitRoleNameFallback)azureEnvYamlhelper; omit empty tenant/nodepool env vars for workload identityOpenShift-specific templates
openshift.yaml— Privileged SCCRoleBindingwhengrantPrivilegedSCC: trueopenshift-namespace.yaml— Pod Security labels on release namespace (when enabled)Validations (
validations.yaml)platformmust beopenshiftif setgcpalone → fail)tokenAttributes.enabledandrequireServiceAccount: trueDaemonSet
Helpers (
_helpers.tpl)New template functions:
isOpenShift,isOpenShiftStaging,openshiftPlatformPlugin,openshiftKubeletConfigPath,kubeletConfigYaml(includes OpenShift AWS),useHostMount,addProviderConfigEnvAssignments,azureEnvYaml,awsOmitRoleNameFallback,openshiftLabelNamespacePodSecurityBinary / Go changes (minimal)
Only three Go files differ from v1.1.2:
internal/provider/config.goactivating/reloadingas normal, journalctl hints on rollback (helps OpenShift kubelet restarts after config merge)internal/utils/utils.gofmt.Errorfformat foraws_auth_methodvalidationinternal/utils/merge_platform_test.goargssurvive YAML merge with JFrog providerNo changes to AWS/Azure/GCP credential exchange handlers in this PR; OpenShift reuses existing
web_identity(AWS) and OIDC exchange (Azure) flows with projected SA tokens from the kubelet.Install notes (reviewers & operators)
tokenAttributes.helm --create-namespacewith defaultopenshift.labelNamespacePodSecurity: true— pre-create the namespace and apply Helm ownership labels (documented inOpenShift.md; test scripts do this automatically).eks.amazonaws.com/role-arn+JFrogExchangeon AWS;azure.workload.identity/client-id+JFrogExchangeon Azure). Never annotate the chart DaemonSet SA.azure_app_client_idis the Artifactory exchange audience (e.g.*@*), not an Entra app ID.Out of scope / explicitly deferred
platform: openshift+gcp.enabledfails validation)jfrog/jfrog-credential-providerchart repo (install from local./helmuntil released)Suggested test plan
Automated
go test ./internal/utils/ -run TestMergeOpenShiftPlatform -v helm template jfrog-cp ./helm -f examples/openshift-aws-projected-sa-values.yaml --set platform=openshift helm template jfrog-cp ./helm -f examples/openshift-azure-projected-sa-values.yaml --set platform=openshiftManual (OpenShift 4.21+)Removed from this PR at the request of the maintainers. Will be submitting a follow up PR once this PR merges.
AWS (ROSA or self-managed on AWS):Azure (ARO):Sign-off checklist:
ecr-credential-provider.yamloracr-credential-provider.yamlcontainstokenAttributesand JFrog providerimagePullSecretsrequireServiceAccount: trueplatform: openshift)Breaking changes
None for existing EKS/AKS/GKE deployments (
platformdefaults unset).New OpenShift deployments must follow
OpenShift.md(namespace creation, SCC, projected SA annotations, Artifactory identity setup).Release versioning (follow-up)
Chart
version/appVersionremain 1.1.2 on this branch;helm/CHANGELOG.mdtracks OpenShift work under [Unreleased]. Bump chart and binary versions when cutting the next release.