| 1 | suite: test deployment |
| 2 | templates: |
| 3 | - deployment.yaml |
| 4 | tests: |
| 5 | - it: should use configured labels for the deployment selector and pods |
| 6 | set: |
| 7 | labels: |
| 8 | environment: production |
| 9 | release: qwen-serving |
| 10 | asserts: |
| 11 | - equal: |
| 12 | path: spec.selector.matchLabels |
| 13 | value: |
| 14 | environment: production |
| 15 | release: qwen-serving |
| 16 | - equal: |
| 17 | path: spec.template.metadata.labels |
| 18 | value: |
| 19 | environment: production |
| 20 | release: qwen-serving |
| 21 | |
| 22 | - it: should create wait-download-model init container when modelDownload is enabled |
| 23 | set: |
| 24 | extraInit: |
| 25 | modelDownload: |
| 26 | enabled: true |
| 27 | image: |
| 28 | repository: "amazon/aws-cli" |
| 29 | tag: "2.6.4" |
| 30 | pullPolicy: "IfNotPresent" |
| 31 | waitContainer: |
| 32 | command: [ "/bin/bash" ] |
| 33 | args: |
| 34 | - "-eucx" |
| 35 | - "while aws --endpoint-url $S3_ENDPOINT_URL s3 sync --dryrun s3://$S3_BUCKET_NAME/$S3_PATH /data | grep -q download; do sleep 10; done" |
| 36 | downloadJob: |
| 37 | command: [ "/bin/bash" ] |
| 38 | args: |
| 39 | - "-eucx" |
| 40 | - "aws --endpoint-url $S3_ENDPOINT_URL s3 sync s3://$S3_BUCKET_NAME/$S3_PATH /data" |
| 41 | initContainers: [ ] |
| 42 | pvcStorage: "1Gi" |
| 43 | s3modelpath: "relative_s3_model_path/opt-125m" |
| 44 | awsEc2MetadataDisabled: true |
| 45 | asserts: |
| 46 | - hasDocuments: |
| 47 | count: 1 |
| 48 | - isKind: |
| 49 | of: Deployment |
| 50 | - isNotEmpty: |
| 51 | path: spec.template.spec.initContainers |
| 52 | - equal: |
| 53 | path: spec.template.spec.initContainers[0].name |
| 54 | value: wait-download-model |
| 55 | - equal: |
| 56 | path: spec.template.spec.initContainers[0].image |
| 57 | value: amazon/aws-cli:2.6.4 |
| 58 | - equal: |
| 59 | path: spec.template.spec.initContainers[0].imagePullPolicy |
| 60 | value: IfNotPresent |
| 61 | |
| 62 | - it: should only create custom init containers when modelDownload is disabled |
| 63 | set: |
| 64 | extraInit: |
| 65 | modelDownload: |
| 66 | enabled: false |
| 67 | image: |
| 68 | repository: "amazon/aws-cli" |
| 69 | tag: "2.6.4" |
| 70 | pullPolicy: "IfNotPresent" |
| 71 | waitContainer: |
| 72 | command: [ "/bin/bash" ] |
| 73 | args: [ "-c", "echo test" ] |
| 74 | downloadJob: |
| 75 | command: [ "/bin/bash" ] |
| 76 | args: [ "-c", "echo test" ] |
| 77 | initContainers: |
| 78 | - name: llm-d-routing-proxy |
| 79 | image: ghcr.io/llm-d/llm-d-routing-sidecar:v0.2.0 |
| 80 | imagePullPolicy: IfNotPresent |
| 81 | ports: |
| 82 | - containerPort: 8080 |
| 83 | name: proxy |
| 84 | pvcStorage: "10Gi" |
| 85 | asserts: |
| 86 | - hasDocuments: |
| 87 | count: 1 |
| 88 | - isKind: |
| 89 | of: Deployment |
| 90 | - lengthEqual: |
| 91 | path: spec.template.spec.initContainers |
| 92 | count: 1 |
| 93 | - equal: |
| 94 | path: spec.template.spec.initContainers[0].name |
| 95 | value: llm-d-routing-proxy |
| 96 | - equal: |
| 97 | path: spec.template.spec.initContainers[0].image |
| 98 | value: ghcr.io/llm-d/llm-d-routing-sidecar:v0.2.0 |
| 99 | - equal: |
| 100 | path: spec.template.spec.initContainers[0].ports[0].containerPort |
| 101 | value: 8080 |
| 102 | |
| 103 | - it: should create both wait-download-model and custom init containers when both are enabled |
| 104 | set: |
| 105 | extraInit: |
| 106 | modelDownload: |
| 107 | enabled: true |
| 108 | image: |
| 109 | repository: "amazon/aws-cli" |
| 110 | tag: "2.6.4" |
| 111 | pullPolicy: "IfNotPresent" |
| 112 | waitContainer: |
| 113 | command: [ "/bin/bash" ] |
| 114 | args: |
| 115 | - "-eucx" |
| 116 | - "while aws --endpoint-url $S3_ENDPOINT_URL s3 sync --dryrun s3://$S3_BUCKET_NAME/$S3_PATH /data | grep -q download; do sleep 10; done" |
| 117 | downloadJob: |
| 118 | command: [ "/bin/bash" ] |
| 119 | args: |
| 120 | - "-eucx" |
| 121 | - "aws --endpoint-url $S3_ENDPOINT_URL s3 sync s3://$S3_BUCKET_NAME/$S3_PATH /data" |
| 122 | initContainers: |
| 123 | - name: llm-d-routing-proxy |
| 124 | image: ghcr.io/llm-d/llm-d-routing-sidecar:v0.2.0 |
| 125 | imagePullPolicy: IfNotPresent |
| 126 | ports: |
| 127 | - containerPort: 8080 |
| 128 | name: proxy |
| 129 | pvcStorage: "10Gi" |
| 130 | asserts: |
| 131 | - hasDocuments: |
| 132 | count: 1 |
| 133 | - isKind: |
| 134 | of: Deployment |
| 135 | - lengthEqual: |
| 136 | path: spec.template.spec.initContainers |
| 137 | count: 2 |
| 138 | - equal: |
| 139 | path: spec.template.spec.initContainers[0].name |
| 140 | value: wait-download-model |
| 141 | - equal: |
| 142 | path: spec.template.spec.initContainers[0].image |
| 143 | value: amazon/aws-cli:2.6.4 |
| 144 | - equal: |
| 145 | path: spec.template.spec.initContainers[1].name |
| 146 | value: llm-d-routing-proxy |
| 147 | - equal: |
| 148 | path: spec.template.spec.initContainers[1].image |
| 149 | value: ghcr.io/llm-d/llm-d-routing-sidecar:v0.2.0 |
| 150 | - equal: |
| 151 | path: spec.template.spec.initContainers[1].ports[0].containerPort |
| 152 | value: 8080 |