-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for k8ify.imagePullSecret label
- Loading branch information
1 parent
1951858
commit e04420d
Showing
20 changed files
with
613 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--- | ||
environments: | ||
prod: | ||
vars: | ||
REGULAR_DEPLOYMENT_IMAGEPULLSECRET: | | ||
{ | ||
"auths": { | ||
"https://index.docker.io/v1/": { | ||
"auth": "foo" | ||
} | ||
} | ||
} | ||
REGULAR_STATEFULLSET_IMAGEPULLSECRET: | | ||
{ | ||
"auths": { | ||
"https://index.docker.io/v1/": { | ||
"auth": "bar" | ||
} | ||
} | ||
} | ||
PART_OF_DEPLOYMENT_IMAGEPULLSECRET: | | ||
{ | ||
"auths": { | ||
"https://index.docker.io/v1/": { | ||
"auth": "foo-baz" | ||
} | ||
} | ||
} | ||
PART_OF_DEPLOYMENT_SIDECAR_IMAGEPULLSECRET: | | ||
{ | ||
"auths": { | ||
"https://index.docker.io/v1/": { | ||
"auth": "foo-baz-part" | ||
} | ||
} | ||
} | ||
PART_OF_STATEFULLSET_IMAGEPULLSECRET: | | ||
{ | ||
"auths": { | ||
"https://index.docker.io/v1/": { | ||
"auth": "bar-baz" | ||
} | ||
} | ||
} | ||
PART_OF_STATEFULLSET_SIDECAR_IMMAGEPULLSECRET: | | ||
{ | ||
"auths": { | ||
"https://index.docker.io/v1/": { | ||
"auth": "bar-baz-part" | ||
} | ||
} | ||
} | ||
FOO : "one" | ||
BAR : "two" | ||
BAZ : "three" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
version: '3.4' | ||
services: | ||
regular-deployment: | ||
image: nginx | ||
labels: | ||
k8ify.imagePullSecret: '$REGULAR_DEPLOYMENT_IMAGEPULLSECRET' | ||
environment: | ||
- FOO | ||
- BAR=${BAR} | ||
- something_else=${BAZ} | ||
- "PASSWORD=$_ref_:mongodb-secret:password" | ||
- "FOOREF=$_ref_:foo:fooooooo" | ||
- "BARREF=$_ref_:bar:baaaaaar" | ||
|
||
regular-statefullset: | ||
image: mongodb | ||
labels: | ||
k8ify.imagePullSecret: '$REGULAR_STATEFULLSET_IMAGEPULLSECRET' | ||
k8ify.singleton: true | ||
volumes: | ||
- regular-statefullset:/data | ||
environment: | ||
- FOO | ||
- BAR=${BAR} | ||
- something_else=${BAZ} | ||
- "PASSWORD=$_ref_:mongodb-secret:password" | ||
- "FOOREF=$_ref_:foo:fooooooo" | ||
- "BARREF=$_ref_:bar:baaaaaar" | ||
|
||
part-of-deployment: | ||
image: nginx-frontend | ||
labels: | ||
k8ify.imagePullSecret: '$PART_OF_DEPLOYMENT_IMAGEPULLSECRET' | ||
environment: | ||
- FOO | ||
- BAR=${BAR} | ||
- something_else=${BAZ} | ||
- "PASSWORD=$_ref_:mongodb-secret:password" | ||
- "FOOREF=$_ref_:foo:fooooooo" | ||
- "BARREF=$_ref_:bar:baaaaaar" | ||
|
||
part-of-deployment-sidecar: | ||
image: php-backend | ||
labels: | ||
k8ify.imagePullSecret: '$PART_OF_DEPLOYMENT_SIDECAR_IMAGEPULLSECRET' | ||
k8ify.partOf: 'part-of-deployment' | ||
|
||
part-of-statefullset: | ||
labels: | ||
k8ify.imagePullSecret: '$PART_OF_STATEFULLSET_IMAGEPULLSECRET' | ||
k8ify.singleton: true | ||
image: postgres | ||
volumes: | ||
- part-of-statefullset:/data | ||
environment: | ||
- FOO | ||
- BAR=${BAR} | ||
- something_else=${BAZ} | ||
- "PASSWORD=$_ref_:mongodb-secret:password" | ||
- "FOOREF=$_ref_:foo:fooooooo" | ||
- "BARREF=$_ref_:bar:baaaaaar" | ||
|
||
part-of-statefullset-sidecar: | ||
labels: | ||
k8ify.imagePullSecret: '$PART_OF_STATEFULLSET_SIDECAR_IMMAGEPULLSECRET' | ||
k8ify.partOf: 'part-of-statefullset' | ||
k8ify.singleton: true | ||
image: pgpool | ||
|
||
volumes: | ||
regular-statefullset: | ||
labels: | ||
k8ify.singleton: true | ||
part-of-statefullset: | ||
labels: | ||
k8ify.singleton: true |
66 changes: 66 additions & 0 deletions
66
tests/golden/imagepullsecrets/manifests/part-of-deployment-oasp-deployment.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
creationTimestamp: null | ||
labels: | ||
k8ify.ref-slug: oasp | ||
k8ify.service: part-of-deployment | ||
name: part-of-deployment-oasp | ||
spec: | ||
selector: | ||
matchLabels: | ||
k8ify.ref-slug: oasp | ||
k8ify.service: part-of-deployment | ||
strategy: | ||
type: Recreate | ||
template: | ||
metadata: | ||
creationTimestamp: null | ||
labels: | ||
k8ify.ref-slug: oasp | ||
k8ify.service: part-of-deployment | ||
spec: | ||
affinity: | ||
podAntiAffinity: | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
- labelSelector: | ||
matchExpressions: | ||
- key: k8ify.service | ||
operator: In | ||
values: | ||
- part-of-deployment | ||
topologyKey: kubernetes.io/hostname | ||
containers: | ||
- env: | ||
- name: BARREF | ||
valueFrom: | ||
secretKeyRef: | ||
key: baaaaaar | ||
name: bar | ||
- name: FOOREF | ||
valueFrom: | ||
secretKeyRef: | ||
key: fooooooo | ||
name: foo | ||
- name: PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
key: password | ||
name: mongodb-secret | ||
envFrom: | ||
- secretRef: | ||
name: part-of-deployment-oasp-env | ||
image: nginx-frontend | ||
imagePullPolicy: Always | ||
name: part-of-deployment-oasp | ||
resources: {} | ||
- image: php-backend | ||
imagePullPolicy: Always | ||
name: part-of-deployment-sidecar-oasp | ||
resources: {} | ||
enableServiceLinks: false | ||
imagePullSecrets: | ||
- name: part-of-deployment-oasp-imagePull-secret | ||
- name: part-of-deployment-sidecar-oasp-imagePull-secret | ||
restartPolicy: Always | ||
status: {} |
12 changes: 12 additions & 0 deletions
12
tests/golden/imagepullsecrets/manifests/part-of-deployment-oasp-env-secret.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
creationTimestamp: null | ||
labels: | ||
k8ify.ref-slug: oasp | ||
k8ify.service: part-of-deployment | ||
name: part-of-deployment-oasp-env | ||
stringData: | ||
BAR: two | ||
FOO: one | ||
something_else: three |
18 changes: 18 additions & 0 deletions
18
tests/golden/imagepullsecrets/manifests/part-of-deployment-oasp-imagePull-secret.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
creationTimestamp: null | ||
labels: | ||
k8ify.ref-slug: oasp | ||
k8ify.service: part-of-deployment | ||
name: part-of-deployment-oasp-imagePull | ||
stringData: | ||
.dockerconfigjson: | | ||
{ | ||
"auths": { | ||
"https://index.docker.io/v1/": { | ||
"auth": "foo-baz" | ||
} | ||
} | ||
} | ||
type: kubernetes.io/dockerconfigjson |
18 changes: 18 additions & 0 deletions
18
...s/golden/imagepullsecrets/manifests/part-of-deployment-sidecar-oasp-imagePull-secret.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
creationTimestamp: null | ||
labels: | ||
k8ify.ref-slug: oasp | ||
k8ify.service: part-of-deployment | ||
name: part-of-deployment-sidecar-oasp-imagePull | ||
stringData: | ||
.dockerconfigjson: | | ||
{ | ||
"auths": { | ||
"https://index.docker.io/v1/": { | ||
"auth": "foo-baz-part" | ||
} | ||
} | ||
} | ||
type: kubernetes.io/dockerconfigjson |
11 changes: 11 additions & 0 deletions
11
tests/golden/imagepullsecrets/manifests/part-of-statefullset-env-secret.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
creationTimestamp: null | ||
labels: | ||
k8ify.service: part-of-statefullset | ||
name: part-of-statefullset-env | ||
stringData: | ||
BAR: two | ||
FOO: one | ||
something_else: three |
Oops, something went wrong.