Skip to content

Conversation

@abeatrix
Copy link
Contributor

@abeatrix abeatrix commented Mar 13, 2023

Description

RE: https://sourcegraph.slack.com/archives/C02E4HE42BX/p1678721977364219

We have a component in Kustomize for using a private registry, but it looks like that component doesn’t account for adding image pull secrets. Is the customer (and am I) missing something here?

User can add a patch to add new field to all resources, for example:

patches:
  - patch: |-
      - op: add
        path: /spec/template/spec/imagePullSecrets
        value:
          name: registrykey
    target:
      group: apps
      kind: StatefulSet|Deployment|DaemonSet
      version: v1

This PR turns this suggested patch into a component for easier configuration.


Checklist

Test plan

  1. Run kubectl kustomize examples/demo/private-registry -o test.yaml from the root of this repository in this branch
  2. check the output file test.yamlto see the imagePullSecrets field has been added to all resources with value from buildConfig.yaml

Copy link

@scjohns scjohns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for the quick turnaround here

@abeatrix abeatrix merged commit 6e45f6a into main Mar 13, 2023
abeatrix added a commit to sourcegraph/sourcegraph-public-snapshot that referenced this pull request Mar 13, 2023
@abeatrix abeatrix deleted the bee/imagepullsecrets branch March 13, 2023 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants