-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
160 additions
and
0 deletions.
There are no files selected for viewing
122 changes: 122 additions & 0 deletions
122
charts/snyk-broker/tests/__snapshot__/broker_cra_deployment_extraPodSpecs_test.yaml.snap
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,122 @@ | ||
renders extraPodSpecs CRA: | ||
1: | | ||
containers: | ||
- env: | ||
- name: BROKER_SERVER_URL | ||
value: https://broker.test.snyk.io | ||
- name: BROKER_HEALTHCHECK_PATH | ||
value: /healthcheck | ||
- name: BROKER_SYSTEMCHECK_PATH | ||
value: /systemcheck | ||
- name: BROKER_TOKEN | ||
valueFrom: | ||
secretKeyRef: | ||
key: container-registry-agent-broker-token-key | ||
name: container-registry-agent-broker-token-RELEASE-NAME | ||
- name: CR_AGENT_URL | ||
value: http://cra-service-RELEASE-NAME:8081 | ||
- name: CR_TYPE | ||
value: ecr | ||
- name: CR_ROLE_ARN | ||
value: arn:aws-us-gov:iam::123456789012:role | ||
- name: CR_REGION | ||
value: eu-west | ||
- name: CR_EXTERNAL_ID | ||
value: 11111111-1111-1111-1111-111111111111 | ||
- name: PORT | ||
value: "8000" | ||
- name: BROKER_CLIENT_URL | ||
value: http://container-registry-agent-broker-service-RELEASE-NAME:8000 | ||
- name: BROKER_CLIENT_VALIDATION_URL | ||
value: http://cra-service-RELEASE-NAME:8081/healthcheck | ||
- name: LOG_LEVEL | ||
value: info | ||
- name: LOG_ENABLE_BODY | ||
value: "false" | ||
- name: BROKER_DISPATCHER_BASE_URL | ||
value: https://api.test.snyk.io | ||
image: snyk/broker:container-registry-agent | ||
imagePullPolicy: Always | ||
livenessProbe: | ||
failureThreshold: 3 | ||
httpGet: | ||
path: /healthcheck | ||
port: 8000 | ||
scheme: HTTP | ||
initialDelaySeconds: 3 | ||
periodSeconds: 10 | ||
timeoutSeconds: 1 | ||
name: container-registry-agent-broker-RELEASE-NAME | ||
ports: | ||
- containerPort: 8000 | ||
name: http | ||
readinessProbe: | ||
failureThreshold: 3 | ||
httpGet: | ||
path: /healthcheck | ||
port: 8000 | ||
scheme: HTTP | ||
initialDelaySeconds: 3 | ||
periodSeconds: 10 | ||
timeoutSeconds: 1 | ||
resources: | ||
limits: | ||
cpu: 1 | ||
memory: 256Mi | ||
requests: | ||
cpu: 1 | ||
memory: 256Mi | ||
securityContext: | ||
allowPrivilegeEscalation: false | ||
capabilities: | ||
drop: | ||
- ALL | ||
readOnlyRootFilesystem: true | ||
runAsNonRoot: true | ||
runAsUser: 1000 | ||
volumeMounts: null | ||
nodeSelector: | ||
corp.io/node-classification: snyk | ||
securityContext: {} | ||
serviceAccountName: snyk-broker-RELEASE-NAME | ||
tolerations: | ||
- effect: NoSchedule | ||
key: networking/something | ||
operator: Equal | ||
value: internal-pods | ||
volumes: null | ||
2: | | ||
containers: | ||
- env: | ||
- name: SNYK_PORT | ||
value: "8081" | ||
image: snyk/container-registry-agent:latest | ||
imagePullPolicy: Always | ||
name: container-registry-agent-RELEASE-NAME | ||
ports: | ||
- containerPort: 8081 | ||
name: http | ||
resources: | ||
limits: | ||
cpu: 1 | ||
memory: 2Gi | ||
requests: | ||
cpu: 1 | ||
memory: 2Gi | ||
securityContext: | ||
allowPrivilegeEscalation: false | ||
capabilities: | ||
drop: | ||
- ALL | ||
readOnlyRootFilesystem: false | ||
runAsNonRoot: true | ||
runAsUser: 1000 | ||
nodeSelector: | ||
corp.io/node-classification: snyk | ||
securityContext: {} | ||
serviceAccountName: snyk-broker-RELEASE-NAME | ||
tolerations: | ||
- effect: NoSchedule | ||
key: networking/something | ||
operator: Equal | ||
value: internal-pods |
20 changes: 20 additions & 0 deletions
20
charts/snyk-broker/tests/broker_cra_deployment_extraPodSpecs_test.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,20 @@ | ||
suite: test broker deployment with extraPodSpec | ||
chart: | ||
version: 0.0.0 | ||
templates: | ||
- broker_deployment.yaml | ||
- cra_deployment.yaml | ||
values: | ||
- ./fixtures/default_values_cra.yaml | ||
- ./fixtures/extra_pod_spec_values.yaml | ||
|
||
tests: | ||
- it: renders extraPodSpecs CRA | ||
asserts: | ||
- matchSnapshot: | ||
path: spec.template.spec | ||
template: broker_deployment.yaml | ||
- matchSnapshot: | ||
path: spec.template.spec | ||
template: cra_deployment.yaml | ||
documentIndex: 0 |
18 changes: 18 additions & 0 deletions
18
charts/snyk-broker/tests/fixtures/extra_pod_spec_values.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 @@ | ||
|
||
extraPodSpecs: | ||
tolerations: | ||
- key: "networking/something" | ||
operator: "Equal" | ||
value: "internal-pods" | ||
effect: "NoSchedule" | ||
nodeSelector: | ||
corp.io/node-classification: snyk | ||
|
||
extraPodSpecsCr: | ||
tolerations: | ||
- key: "networking/something" | ||
operator: "Equal" | ||
value: "internal-pods" | ||
effect: "NoSchedule" | ||
nodeSelector: | ||
corp.io/node-classification: snyk |