|
| 1 | +# yaml-language-server: $schema=https://raw.githubusercontent.com/quintush/helm-unittest/master/schema/helm-testsuite.json |
| 2 | +suite: private_registry test |
| 3 | +values: |
| 4 | + - ../values.yaml |
| 5 | + - ../values-private-registry.yaml |
| 6 | +templates: |
| 7 | + - templates/hooks/post-install/cm-update-runtime.yaml |
| 8 | + - templates/runner/deployment.yaml |
| 9 | + - templates/volume-provisioner/deployment.yaml |
| 10 | + - templates/volume-provisioner/daemonset.yaml |
| 11 | + - templates/volume-provisioner/cronjob.yaml |
| 12 | + - templates/monitor/deployment.yaml |
| 13 | + - templates/app-proxy/deployment.yaml |
| 14 | +release: |
| 15 | + name: cf-runtime |
| 16 | + namespace: codefresh |
| 17 | + revision: 1 |
| 18 | + upgrade: true |
| 19 | +chart: |
| 20 | + version: 1.0.0 |
| 21 | + appVersion: 1.0.0 |
| 22 | +tests: |
| 23 | + - it: Test private registry in runtime spec |
| 24 | + template: templates/hooks/post-install/cm-update-runtime.yaml |
| 25 | + asserts: |
| 26 | + - equal: |
| 27 | + path: data["runtime.yaml"] |
| 28 | + value: |- |
| 29 | + metadata: |
| 30 | + name: my-context/codefresh |
| 31 | + agent: true |
| 32 | + extends: |
| 33 | + - system/default/hybrid/k8s_low_limits |
| 34 | + runtimeScheduler: |
| 35 | + type: KubernetesPod |
| 36 | + image: somedomain.io/codefresh/engine:tagoverride |
| 37 | + command: |
| 38 | + - npm |
| 39 | + - run |
| 40 | + - start |
| 41 | + envVars: |
| 42 | + COMPOSE_IMAGE: 'somedomain.io/codefresh/compose:tagoverride' |
| 43 | + CONTAINER_LOGGER_IMAGE: 'somedomain.io/codefresh/cf-container-logger:tagoverride' |
| 44 | + DOCKER_BUILDER_IMAGE: 'somedomain.io/codefresh/cf-docker-builder:tagoverride' |
| 45 | + DOCKER_PULLER_IMAGE: 'somedomain.io/codefresh/cf-docker-puller:tagoverride' |
| 46 | + DOCKER_PUSHER_IMAGE: 'somedomain.io/codefresh/cf-docker-pusher:tagoverride' |
| 47 | + DOCKER_TAG_PUSHER_IMAGE: 'somedomain.io/codefresh/cf-docker-tag-pusher:tagoverride' |
| 48 | + FS_OPS_IMAGE: 'somedomain.io/codefresh/fs-ops:tagoverride' |
| 49 | + GIT_CLONE_IMAGE: 'somedomain.io/codefresh/cf-git-cloner:tagoverride' |
| 50 | + KUBE_DEPLOY: 'somedomain.io/codefresh/cf-deploy-kubernetes:tagoverride' |
| 51 | + PIPELINE_DEBUGGER_IMAGE: 'somedomain.io/codefresh/cf-debugger:tagoverride' |
| 52 | + TEMPLATE_ENGINE: 'somedomain.io/codefresh/pikolo:tagoverride' |
| 53 | + cluster: |
| 54 | + namespace: codefresh |
| 55 | + serviceAccount: codefresh-engine |
| 56 | + clusterProvider: |
| 57 | + accountId: 7890 |
| 58 | + selector: my-context |
| 59 | + resources: |
| 60 | + limits: |
| 61 | + cpu: 1000m |
| 62 | + memory: 2048Mi |
| 63 | + requests: |
| 64 | + cpu: 100m |
| 65 | + memory: 128Mi |
| 66 | + dockerDaemonScheduler: |
| 67 | + type: DindKubernetesPod |
| 68 | + dindImage: somedomain.io/codefresh/dind:tagoverride |
| 69 | + userAccess: true |
| 70 | + cluster: |
| 71 | + namespace: codefresh |
| 72 | + serviceAccount: codefresh-engine |
| 73 | + clusterProvider: |
| 74 | + accountId: 7890 |
| 75 | + selector: my-context |
| 76 | + pvcs: |
| 77 | + - name: dind |
| 78 | + reuseVolumeSelector: codefresh-app,io.codefresh.accountName |
| 79 | + reuseVolumeSortOrder: pipeline_id |
| 80 | + storageClassName: 'dind-local-volumes-runner-codefresh' |
| 81 | + volumeSize: 16Gi |
| 82 | + defaultDindResources: |
| 83 | + limits: |
| 84 | + cpu: 400m |
| 85 | + memory: 800Mi |
| 86 | + requests: null |
| 87 | +
|
| 88 | + - it: Test private registy in runner |
| 89 | + template: templates/runner/deployment.yaml |
| 90 | + asserts: |
| 91 | + - matchRegex: |
| 92 | + path: spec.template.spec.containers[0].image |
| 93 | + pattern: ^somedomain.io/codefresh/.*$ |
| 94 | + |
| 95 | + - it: Test private registy in runner init container |
| 96 | + template: templates/runner/deployment.yaml |
| 97 | + asserts: |
| 98 | + - matchRegex: |
| 99 | + path: spec.template.spec.initContainers[0].image |
| 100 | + pattern: ^somedomain.io/codefresh/.*$ |
| 101 | + |
| 102 | + - it: Test private registy in volume-provisioner |
| 103 | + template: templates/runner/deployment.yaml |
| 104 | + asserts: |
| 105 | + - matchRegex: |
| 106 | + path: spec.template.spec.containers[0].image |
| 107 | + pattern: ^somedomain.io/codefresh/.*$ |
| 108 | + |
| 109 | + - it: Test private registy in dind-lv-monitor |
| 110 | + template: templates/volume-provisioner/daemonset.yaml |
| 111 | + asserts: |
| 112 | + - matchRegex: |
| 113 | + path: spec.template.spec.containers[0].image |
| 114 | + pattern: ^somedomain.io/codefresh/.*$ |
| 115 | + |
| 116 | + - it: Test private registy in cronjob |
| 117 | + template: templates/volume-provisioner/cronjob.yaml |
| 118 | + set: |
| 119 | + storage.backend: ebs-csi |
| 120 | + asserts: |
| 121 | + - matchRegex: |
| 122 | + path: spec.jobTemplate.spec.template.spec.containers[0].image |
| 123 | + pattern: ^somedomain.io/codefresh/.*$ |
| 124 | + |
| 125 | + - it: Test private registy in monitor |
| 126 | + template: templates/monitor/deployment.yaml |
| 127 | + set: |
| 128 | + monitor.enabled: true |
| 129 | + asserts: |
| 130 | + - matchRegex: |
| 131 | + path: spec.template.spec.containers[0].image |
| 132 | + pattern: ^somedomain.io/codefresh/.*$ |
| 133 | + |
| 134 | + - it: Test private registy in app-proxy |
| 135 | + template: templates/app-proxy/deployment.yaml |
| 136 | + set: |
| 137 | + appProxy.enabled: true |
| 138 | + asserts: |
| 139 | + - matchRegex: |
| 140 | + path: spec.template.spec.containers[0].image |
| 141 | + pattern: ^somedomain.io/codefresh/.*$ |
| 142 | + |
| 143 | + - it: Test private registy in hooks |
| 144 | + asserts: |
| 145 | + - matchRegex: |
| 146 | + path: spec.template.spec.containers[0].image |
| 147 | + pattern: ^somedomain.io/codefresh/.*$ |
| 148 | + template: templates/hooks/post-install/job-update-runtime.yaml |
| 149 | + - matchRegex: |
| 150 | + path: spec.template.spec.containers[0].image |
| 151 | + pattern: ^somedomain.io/codefresh/.*$ |
| 152 | + template: templates/hooks/post-install/job-gencerts-dind.yaml |
| 153 | + |
0 commit comments