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

feat(cik8s,doks): add dockerhub image pull secret for datadog and jenkins-agents #2112

Merged
merged 11 commits into from
Mar 21, 2022
14 changes: 14 additions & 0 deletions clusters/cik8s.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,19 @@ repositories:
- name: jenkins-infra
url: https://jenkins-infra.github.io/helm-charts
releases:
- name: docker-registry-secrets
#this helmchart doesn't create any resources within the namespace specified below.
#specifying a namespace is required by the "needs" feature of helmfile (to allow referencing to this release from others)
namespace: default
Copy link
Member

Choose a reason for hiding this comment

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

I wouldn't put it in the "default" namespace, maybe "docker-registry" here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

agreed, but @dduportal said to go by step ;) ...
still a WIP

Copy link
Contributor

Choose a reason for hiding this comment

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

We discovered that specifying a nemspace for the helmfile release is required (despite what the doc. says) to allow referencing from other release (with the needs keyword).

Since this helm chart does not create any resource in the aformentioned namespace (it creates in the value-specified namespaceS), I proposed to use "defaukt" here, as a "no-op" value.

Stephane just added a comment in the code to explain this. WDYT?

Copy link
Member

@lemeurherve lemeurherve Mar 21, 2022

Choose a reason for hiding this comment

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

I dunno about the "default" namespace, which is frequently used for tests or install without being cautious, and subject to deleting. Not a big problem per se, but I'd put it in the existing "jenkins-agents", WDYT?

chart: jenkins-infra/docker-registry-secrets
version: 0.1.0
values:
- "../config/docker-registry-secrets.yaml"
secrets:
- "../secrets/config/docker-registry-secrets/secrets.yaml"
- name: datadog
needs:
- default/docker-registry-secrets
namespace: datadog
chart: datadog/datadog
version: 2.30.17
Expand All @@ -24,6 +36,8 @@ releases:
secrets:
- "../secrets/config/datadog/secrets.yaml"
- name: jenkins-agents
needs:
- default/docker-registry-secrets
namespace: jenkins-agents
chart: jenkins-infra/jenkins-kubernetes-agents
version: 0.2.1
Expand Down
14 changes: 14 additions & 0 deletions clusters/doks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,19 @@ repositories:
- name: jenkins-infra
url: https://jenkins-infra.github.io/helm-charts
releases:
- name: docker-registry-secrets
#this helmchart doesn't create any resources within the namespace specified below.
#specifying a namespace is required by the "needs" feature of helmfile (to allow referencing to this release from others)
namespace: default
chart: jenkins-infra/docker-registry-secrets
version: 0.1.0
values:
- "../config/docker-registry-secrets.yaml"
secrets:
- "../secrets/config/docker-registry-secrets/secrets.yaml"
- name: datadog
needs:
- default/docker-registry-secrets
namespace: datadog
chart: datadog/datadog
version: 2.30.17
Expand All @@ -20,6 +32,8 @@ releases:
secrets:
- "../secrets/config/datadog/secrets.yaml"
- name: jenkins-agents
needs:
- default/docker-registry-secrets
namespace: jenkins-agents
chart: jenkins-infra/jenkins-kubernetes-agents
version: 0.2.1
Expand Down
5 changes: 5 additions & 0 deletions config/docker-registry-secrets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
imageCredentials:
enabled: true
namespaces:
- datadog
- jenkins-agents