Skip to content

Commit

Permalink
Merge pull request kubernetes#1146 from wojtek-t/immutable_secrets_test
Browse files Browse the repository at this point in the history
Extend load test to immutable secrets/configmaps
  • Loading branch information
k8s-ci-robot committed Apr 28, 2020
2 parents b73ca50 + 688f020 commit 1dadf40
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
3 changes: 3 additions & 0 deletions clusterloader2/testing/load/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: {{.Name}}
{{if not (eq (Mod .Index 20) 0 19) }} # .Index % 20 in {0,19} - only 10% deployments will have non-immutable ConfigMap.
immutable: true
{{end}}
data:
data.yaml: |-
a: 1
Expand Down
8 changes: 0 additions & 8 deletions clusterloader2/testing/load/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,10 @@ spec:
cpu: {{$CpuRequest}}
memory: {{$MemoryRequest}}
volumeMounts:
{{if (eq (Mod .Index 20) 0 19) }} # .Index % 20 in {0,19} - 10% deployments will have ConfigMap
- name: configmap
mountPath: /var/configmap
{{end}}
{{if (eq (Mod .Index 20) 10 19) }} # .Index % 20 in {10,19} - 10% deployments will have Secret
- name: secret
mountPath: /var/secret
{{end}}
dnsPolicy: Default
terminationGracePeriodSeconds: 1
# Add not-ready/unreachable tolerations for 15 minutes so that node
Expand All @@ -50,14 +46,10 @@ spec:
effect: "NoExecute"
tolerationSeconds: 900
volumes:
{{if (eq (Mod .Index 20) 0 19) }} # .Index % 20 in {0,19} - 10% deployments will have ConfigMap
- name: configmap
configMap:
name: {{.BaseName}}-{{.Index}}
{{end}}
{{if (eq (Mod .Index 20) 10 19) }} # .Index % 20 in {10,19} - 10% deployments will have Secret
- name: secret
secret:
secretName: {{.BaseName}}-{{.Index}}
{{end}}

3 changes: 3 additions & 0 deletions clusterloader2/testing/load/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ apiVersion: v1
kind: Secret
metadata:
name: {{.Name}}
{{if not (eq (Mod .Index 20) 10 19) }} # .Index % 20 in {10,19} - only 10% deployments will have non-immutable Secret.
immutable: true
{{end}}
type: Opaque
data:
password: c2NhbGFiaWxpdHkK

0 comments on commit 1dadf40

Please sign in to comment.