Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support ImagePullSecret for pulling from private registry #584

Open
wants to merge 29 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
070be81
support for imagepullsecret
gniltaws Nov 19, 2024
f137ade
extra space from bad paste
gniltaws Nov 21, 2024
855ce27
adjusted version
gniltaws Nov 23, 2024
99e997f
create pullsecret in testing workflow
gniltaws Nov 23, 2024
b139137
add pullsecret name to values file
gniltaws Nov 23, 2024
a7789db
imagePullSecrets was in the wrong location
gniltaws Nov 23, 2024
c7ccebc
bumped version
garethahealy Nov 25, 2024
699c7d5
Merge branch 'main' into imagePullSecret
garethahealy Nov 25, 2024
ba0d782
variable no longer at end of secret creation. Hopefully, this will f…
gniltaws Nov 25, 2024
aa05e68
removed trailing spaces
gniltaws Nov 25, 2024
5683b7e
operators-installer 3.1.0
gniltaws Dec 12, 2024
13020cb
helm chart for private registry secured by htpasswd
gniltaws Dec 12, 2024
e7b9281
WIP on making & using local private registry
gniltaws Dec 12, 2024
9b8b2d1
privateRegistry chart adds Ingress for registry
gniltaws Dec 13, 2024
6010cf5
integration test uses Ingress for push/pulling to private registry
gniltaws Dec 13, 2024
5d4e609
support for imagepullsecret
gniltaws Nov 19, 2024
d5aa33e
privateRegistry is now private-registry
gniltaws Dec 13, 2024
06ba03b
update private-registry chart name in workflow
gniltaws Dec 13, 2024
1b14cbd
add port to skopeo copy
gniltaws Dec 16, 2024
d238e62
fixed spacing
gniltaws Dec 16, 2024
3234c10
stop skopeo using port 443 for private registry
gniltaws Dec 16, 2024
6aac15c
use http for skopeo copy
gniltaws Dec 17, 2024
dc1b8d3
expose port 5000
gniltaws Dec 18, 2024
1921e71
skopeo copy back to docker:// protocol
gniltaws Dec 18, 2024
fb00230
exposing port 80 in kind cluster
gniltaws Dec 18, 2024
e37c76d
adds missing newlines at end of file
gniltaws Dec 18, 2024
fb6427a
removed extra imagePullSecrets
gniltaws Dec 19, 2024
975e97c
added 'name:' key to imagePullSecrets
gniltaws Dec 20, 2024
d3fa48d
increased timeout on the argo upgrade job
gniltaws Dec 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,15 @@ jobs:
--values charts/operators-installer/_integration-tests/test-install-operator-0-automatic-intermediate-manual-upgrades-values.yaml \
--debug --timeout 10m0s

echo "##########################################################################################################"
echo "# Create pull secret used in next step #"
echo "##########################################################################################################"
oc create secret docker-registry registry-redhat-io-pullsecret \
--namespace operators-installer-integration-test \
--docker-password="${{ secrets.REDHAT_REGISTRY_TOKEN }}" \
--docker-server=registry.redhat.io \
--docker-username="6340056|redhat-cop-helm-charts"

echo "##########################################################################################################"
echo "# Upgrade argo to newer version requiring many intermediate updates along the way #"
echo "##########################################################################################################"
Expand Down
2 changes: 1 addition & 1 deletion charts/operators-installer/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 3.0.2
version: 3.0.3
gniltaws marked this conversation as resolved.
Show resolved Hide resolved

home: https://github.com/redhat-cop/helm-charts

Expand Down
1 change: 1 addition & 0 deletions charts/operators-installer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ For all of the Subscription parameters see
| operatorGroups[].targetOwnNamespace | `false` | No | If `true` add the OperatorGroup's Namespace as a `targetNamespaces`. If `true` then OperatorGroup will only work for Operators using `OwnNamespace` or `MultiNamespace` `installModes`. If blank and no `otherTargetNamespaces` specified then OperatorGroup will be configured to allow for operators using `installModes` `AllNamespaces`.
| operatorGroups[].otherTargetNamespaces | `[]` | No | List of additional Namespaces to target. If specified OperatorGroup will only work for operators using `SingleNamespace` or `MultiNamespace` `installModes` depending on value of `targetOwnNamespace`.
| installPlanApproverAndVerifyJobsImage | `registry.redhat.io/openshift4/ose-cli:v4.10` | Yes | Image to use for the InstallPlan Approver and Verify Jobs
| installPlanApproverAndVerifyJobsImagePullSecret | `''` | No | Name of existing secret for pulling `installPlanApproverAndVerifyJobsImage` from a private registry
| approveManualInstallPlanViaHook | `true` | No | `true` to create (and clean up) manual InstallPlan approval resources as part of post-install,post-upgrade helm hook<br>`false` to create manual InstallPlan approval resources as part of normal install<br><br>The hook method is nice to not have lingering resources needed for the manual InstallPlan approval but has the downside that no CustomResources using CustomResourceDefinitions installed by the operator can be used in the same chart because the operator InstallPlan wont be approved, and therefor the operator wont be installed, until the post-install,post-upgrade phase which means you will never get to that phase because your CustomResources wont be able to apply because the Operator isn't installed.<br><br>This is is ultimately a trade off between cleaning up these resources or being able to install and configure the operator in the same helm chart that has a dependency on this helm chart.
| installRequiredPythonLibraries | `true` | No | If `true`, install the required Python libraries (openshift-client, semver==2.13.0) dynamically from the given `pythonIndexURL` and `pythonExtraIndexURL` into the `installPlanApproverAndVerifyJobsImage` at run time
| pythonIndexURL | https://pypi.org/simple/ | No | If `installRequiredPythonLibraries` is `true` then use this python index to pull required libraries
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
approveManualInstallPlanViaHook: true

installPlanApproverAndVerifyJobsImage: quay.io/openshift/origin-cli:4.15
# default image pulls from private registry registry.redhat.io
installPlanApproverAndVerifyJobsImagePullSecret: registry-redhat-io-pullsecret

operatorGroups:
- name: argocd-operator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ spec:
activeDeadlineSeconds: {{ .installPlanApproverActiveDeadlineSeconds }}
template:
spec:
{{- if $.Values.installPlanApproverAndVerifyJobsImagePullSecret }}
imagePullSecrets:
- {{ $.Values.installPlanApproverAndVerifyJobsImagePullSecret }}
{{- end }}
containers:
- name: installplan-approver
image: {{ $.Values.installPlanApproverAndVerifyJobsImage }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ spec:
activeDeadlineSeconds: {{ .installPlanVerifierActiveDeadlineSeconds }}
template:
spec:
{{- if $.Values.installPlanApproverAndVerifyJobsImagePullSecret }}
imagePullSecrets:
- {{ $.Values.installPlanApproverAndVerifyJobsImagePullSecret }}
{{- end }}
containers:
- name: installplan-complete-verifier
image: {{ $.Values.installPlanApproverAndVerifyJobsImage }}
Expand Down
5 changes: 5 additions & 0 deletions charts/operators-installer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ approveManualInstallPlanViaHook: true
# Image to use for the InstallPlan Approver and Verify Jobs
installPlanApproverAndVerifyJobsImage: registry.redhat.io/openshift4/ose-cli:v4.15@sha256:7ea824531b593b2ec0da05557d5cd2565c3525c51c9007f85e9510b27f38b13f

# If specified, this imagePullSecret will be used for pulling the `installPlanApproverAndVerifyJobsImage`.
# Only needed when using a custom image and pulling from a private registry.
# Accepts a single string which is the name of an existing secret. (This chart does not create or manage the secret.)
installPlanApproverAndVerifyJobsImagePullSecret:

# If `true`, install the required Python libraries (openshift-client, semver==2.13.0) dynamically
# from the given `pythonIndexURL` and `pythonExtraIndexURL` into the `installPlanApproverAndVerifyJobsImage` at run time
#
Expand Down
Loading