|
| 1 | +apiVersion: celeryproject.org/v1alpha1 |
| 2 | +kind: Celery |
| 3 | +metadata: |
| 4 | + name: example-celery-obj |
| 5 | +spec: |
| 6 | + image: example-image |
| 7 | + imagePullPolicy: Never |
| 8 | + imagePullSecrets: |
| 9 | + - name: dockerhub-creds |
| 10 | + appName: example-app |
| 11 | + celeryApp: 'app:celery_app' |
| 12 | + celeryVersion: "4.X" |
| 13 | + workerReplicas: 3 |
| 14 | + flowerReplicas: 2 |
| 15 | + workerSpec: |
| 16 | + args: [ "--loglevel", "INFO", "-Ofair", "-Q", "celery", "-c", "2" ] |
| 17 | + env: |
| 18 | + - name: STATSD_HOST |
| 19 | + valueFrom: |
| 20 | + fieldRef: |
| 21 | + apiVersion: v1 |
| 22 | + fieldPath: status.hostIP |
| 23 | + - name: ENV |
| 24 | + valueFrom: |
| 25 | + configMapKeyRef: |
| 26 | + key: ENV |
| 27 | + name: global |
| 28 | + - name: FOO |
| 29 | + value: foo_value |
| 30 | + - name: APP_RELEASE_VERSION |
| 31 | + value: 8bdd66 |
| 32 | + nodeSelector: |
| 33 | + disktype: ssd |
| 34 | + resources: |
| 35 | + requests: |
| 36 | + cpu: "100m" |
| 37 | + memory: "64Mi" |
| 38 | + limits: |
| 39 | + cpu: "200m" |
| 40 | + memory: "128Mi" |
| 41 | + flowerSpec: |
| 42 | + service: |
| 43 | + metadata: |
| 44 | + name: celery-example-flower |
| 45 | + namespace: default |
| 46 | + labels: |
| 47 | + app: celery-example-flower |
| 48 | + spec: |
| 49 | + type: NodePort |
| 50 | + ports: |
| 51 | + - port: 5555 |
| 52 | + protocol: TCP |
| 53 | + selector: |
| 54 | + run: celery-example-flower |
| 55 | + args: [ "--loglevel", "INFO" ] |
| 56 | + nodeSelector: |
| 57 | + disktype: ssd |
| 58 | + env: |
| 59 | + - name: STATSD_HOST |
| 60 | + valueFrom: |
| 61 | + fieldRef: |
| 62 | + apiVersion: v1 |
| 63 | + fieldPath: status.hostIP |
| 64 | + - name: ENV |
| 65 | + valueFrom: |
| 66 | + configMapKeyRef: |
| 67 | + key: ENV |
| 68 | + name: global |
| 69 | + - name: FOOBAR |
| 70 | + value: foobar_value |
| 71 | + - name: APP_RELEASE_VERSION |
| 72 | + value: 8bdd66 |
| 73 | + resources: |
| 74 | + requests: |
| 75 | + cpu: "100m" |
| 76 | + memory: "64Mi" |
| 77 | + limits: |
| 78 | + cpu: "200m" |
| 79 | + memory: "128Mi" |
| 80 | + initContainers: |
| 81 | + - args: |
| 82 | + - -template |
| 83 | + - /configmap/nginx.conf.ctmpl:/config/nginx.conf |
| 84 | + - -log-level |
| 85 | + - trace |
| 86 | + - -once |
| 87 | + env: |
| 88 | + - name: CONSUL_ADDR |
| 89 | + valueFrom: |
| 90 | + fieldRef: |
| 91 | + apiVersion: v1 |
| 92 | + fieldPath: status.hostIP |
| 93 | + - name: CONSUL_TEMPLATE_PREFIX |
| 94 | + valueFrom: |
| 95 | + configMapKeyRef: |
| 96 | + key: CONSUL_TEMPLATE_PREFIX |
| 97 | + name: global |
| 98 | + image: docker-hub.foo.bar/consul-template |
| 99 | + imagePullPolicy: Always |
| 100 | + name: consul-template |
| 101 | + resources: |
| 102 | + limits: |
| 103 | + cpu: 550m |
| 104 | + memory: 400Mi |
| 105 | + requests: |
| 106 | + cpu: 500m |
| 107 | + memory: 200Mi |
| 108 | + terminationMessagePath: /dev/termination-log |
| 109 | + terminationMessagePolicy: File |
| 110 | + volumeMounts: |
| 111 | + - mountPath: /configmap |
| 112 | + name: foo-configmap |
| 113 | + - mountPath: /var/run/secrets/kubernetes.io/serviceaccount |
| 114 | + name: default-token |
| 115 | + readOnly: true |
| 116 | + volumeMounts: |
| 117 | + - mountPath: /code/settings.py |
| 118 | + name: foo-config |
| 119 | + subPath: settings.py |
| 120 | + - mountPath: /code/application/gunicorn.conf |
| 121 | + name: bar-config |
| 122 | + subPath: gunicorn.conf |
| 123 | + - mountPath: /var/run/secrets/kubernetes.io/serviceaccount |
| 124 | + name: default-token |
| 125 | + readOnly: true |
| 126 | + volumes: |
| 127 | + - name: test-volume |
| 128 | + # This AWS EBS volume must already exist. |
| 129 | + awsElasticBlockStore: |
| 130 | + volumeID: "<volume id>" |
| 131 | + fsType: ext4 |
| 132 | + - name: default-token |
| 133 | + secret: |
| 134 | + defaultMode: 420 |
| 135 | + secretName: default-token |
| 136 | + - configMap: |
| 137 | + defaultMode: 420 |
| 138 | + name: foo-configmap |
| 139 | + name: foo-configmap |
| 140 | + livenessProbe: |
| 141 | + failureThreshold: 5 |
| 142 | + httpGet: |
| 143 | + path: /my-app/health |
| 144 | + port: 80 |
| 145 | + scheme: HTTP |
| 146 | + initialDelaySeconds: 5 |
| 147 | + periodSeconds: 20 |
| 148 | + successThreshold: 1 |
| 149 | + timeoutSeconds: 10 |
| 150 | + readinessProbe: |
| 151 | + failureThreshold: 5 |
| 152 | + httpGet: |
| 153 | + path: /my-app/health |
| 154 | + port: 80 |
| 155 | + scheme: HTTP |
| 156 | + initialDelaySeconds: 5 |
| 157 | + periodSeconds: 20 |
| 158 | + successThreshold: 1 |
| 159 | + timeoutSeconds: 10 |
0 commit comments