Repository navigation
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
|
…rt and components Signed-off-by: Davide Doninelli <d.doninelli@gmail.com>
2ad25ed to
246366e
Compare
|
/easycla |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4261 +/- ##
==========================================
+ Coverage 30.25% 30.27% +0.02%
==========================================
Files 478 478
Lines 23169 23176 +7
==========================================
+ Hits 7010 7017 +7
Misses 16159 16159
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| {{- include "tekton-operator.withRegistry" (dict "image" (printf "%s:%s" $image $tag) "registry" .Values.registry) -}} | ||
| {{- end -}} | ||
|
|
||
| {{- define "tekton-operator.pruner-image" -}} |
There was a problem hiding this comment.
for pruner image we shoulndt call withRegistry, otherwise there will be double override (the second is done pruner.go with TEKTON_REGISTRY_OVERRIDE
| {{- end -}} | ||
| {{- end -}} | ||
| {{- printf "%s:%s" $image $tag -}} | ||
| {{- include "tekton-operator.withRegistry" (dict "image" (printf "%s:%s" $image $tag) "registry" .Values.registry) -}} |
There was a problem hiding this comment.
same here for proxy webhook, it is already handled via IMAGE_PIPELINES_PROXY and TEKTON_REGISTRY_OVERRIDE
use withRegistry only for operator image (operator base image and webhook)
| @@ -211,14 +211,20 @@ func overrideImageRegistry(registry, imageName string) string { | |||
| return imageName | |||
There was a problem hiding this comment.
You may want to make this fonction idemptotent
if the image already starts with the override prefix, leave it alone. A second pass becomes a no-op.
Changes
Add a single
registryvalue to the Helm chart to mirror every image to an internal registry (e.g. for air-gapped clusters), and makeTEKTON_REGISTRY_OVERRIDEcover the images it previously missed.Helm chart
registryvalue (host[:port][/path]). It rewrites the registry of the operator's own images (operator, webhook, webhook proxy, prunertkn) through a newtekton-operator.withRegistryhelper.TEKTON_REGISTRY_OVERRIDEon the operator containers, so the components the operator installs use the same mirror. ATEKTON_REGISTRY_OVERRIDEentry inoperator.additionalEnvstakes precedence.Operator
overrideImageRegistrynow treats the first path component as a registry host only if it contains.or:, or islocalhost(the Docker rule). Before this change,bitnami/postgresqllost itsbitnaminamespace; it now becomes<override>/bitnami/postgresql.replaceContainersArgsImageonly matches flags (args starting with-), skips the value after a matched flag, and ignores flags with no value. A flag's value is no longer read as a flag, and the last arg can no longer cause an out-of-range write.tknimage (IMAGE_JOB_PRUNER_TKN) now goes throughTEKTON_REGISTRY_OVERRIDEas well.Docs
docs/AirGapImageConfiguration.md: documents the host-detection rule, the*-image*flags and pruner rewriting, and the new Helmregistryvalue.Tests
pkg/reconciler/common/transformers_test.goand the fixturetestdata/test-replace-image-airgapped.yaml.Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
make test lintbefore submitting a PRSee the contribution guide for more details.
Release Notes