github.com/Financial-Times/publish-availability-monitor@v1.12.0/helm/publish-availability-monitor/templates/deployment.yaml (about) 1 apiVersion: apps/v1 2 kind: Deployment 3 metadata: 4 name: {{ .Values.service.name }} 5 labels: 6 chart: "{{ .Chart.Name | trunc 63 }}" 7 chartVersion: "{{ .Chart.Version | trunc 63 }}" 8 app: {{ .Values.service.name }} 9 visualize: "true" 10 spec: 11 replicas: {{ .Values.replicaCount }} 12 selector: 13 matchLabels: 14 app: {{ .Values.service.name }} 15 template: 16 metadata: 17 labels: 18 app: {{ .Values.service.name }} 19 visualize: "true" 20 spec: 21 affinity: 22 podAntiAffinity: 23 requiredDuringSchedulingIgnoredDuringExecution: 24 - labelSelector: 25 matchExpressions: 26 - key: app 27 operator: In 28 values: 29 - {{ .Values.service.name }} 30 topologyKey: "kubernetes.io/hostname" 31 serviceAccountName: {{ .Values.service.accountName }} 32 containers: 33 - name: {{ .Values.service.name }} 34 image: "{{ .Values.image.repository }}:{{ .Chart.Version }}" 35 imagePullPolicy: {{ .Values.image.pullPolicy }} 36 resources: 37 {{ toYaml .Values.resources | indent 12 }} 38 env: 39 - name: ENVIRONMENT 40 value: "{{ .Values.envs.environment }}" 41 - name: LOG_LEVEL 42 value: "{{ .Values.envs.log_level }}" 43 - name: KAFKA_TOPIC 44 value: "{{ .Values.envs.kafka_topic }}" 45 - name: KAFKA_CONSUMER_GROUP 46 value: "{{ .Values.envs.kafka_consumer_group }}" 47 - name: KAFKA_LAG_TOLERANCE 48 value: "{{ .Values.envs.kafka_lag_tolerance }}" 49 - name: KAFKA_ADDR 50 valueFrom: 51 configMapKeyRef: 52 name: global-config 53 key: msk.kafka.broker.url 54 - name: KAFKA_CLUSTER_ARN 55 valueFrom: 56 configMapKeyRef: 57 name: global-config 58 key: msk.kafka.cluster.arn 59 - name: CONTENT_URL 60 value: "{{ .Values.envs.content_url }}" 61 - name: CONTENT_NEO4J_URL 62 value: "{{ .Values.envs.content_neo4j_url }}" 63 - name: CONTENT_COLLECTION_NEO4J_URL 64 value: "{{ .Values.envs.content_collection_neo4j_url }}" 65 - name: COMPLEMENTARY_CONTENT_URL 66 value: "{{ .Values.envs.complementary_content_url }}" 67 - name: INTERNAL_COMPONENTS_URL 68 value: "{{ .Values.envs.internal_components_url }}" 69 - name: LISTS_URL 70 value: "{{ .Values.envs.lists_url }}" 71 - name: PAGES_URL 72 value: "{{ .Values.envs.pages_url }}" 73 - name: NOTIFICATIONS_URL 74 value: {{ .Values.envs.notifications_url }}\&{{ .Values.envs.notifications_url_param2 }} 75 - name: NOTIFICATIONS_PUSH_URL 76 value: {{ .Values.envs.notifications_push_url }}\&{{ .Values.envs.notifications_push_url_param2 }}\&{{ .Values.envs.notifications_push_url_param3 }}\&{{ .Values.envs.notifications_push_url_param4 }} 77 - name: LIST_NOTIFICATIONS_URL 78 value: "{{ .Values.envs.list_notifications_url }}" 79 - name: LIST_NOTIFICATIONS_PUSH_URL 80 value: "{{ .Values.envs.list_notifications_push_url }}" 81 - name: LIST_NOTIFICATIONS_PUSH_API_KEY 82 valueFrom: 83 secretKeyRef: 84 name: doppler-global-secrets 85 key: PAM_LIST_NOTIFICATIONS_PUSH_API_KEY 86 - name: PAGE_NOTIFICATIONS_URL 87 value: "{{ .Values.envs.page_notifications_url }}" 88 - name: PAGE_NOTIFICATIONS_PUSH_URL 89 value: "{{ .Values.envs.page_notifications_push_url }}" 90 - name: PAGE_NOTIFICATIONS_PUSH_API_KEY 91 valueFrom: 92 secretKeyRef: 93 name: doppler-global-secrets 94 key: PAM_PAGE_NOTIFICATIONS_PUSH_API_KEY 95 - name: NOTIFICATIONS_PUSH_API_KEY 96 valueFrom: 97 secretKeyRef: 98 name: doppler-global-secrets 99 key: PAM_NOTIFICATIONS_PUSH_API_KEY 100 - name: GRAPHITE_ADDRESS 101 value: "{{ .Values.envs.graphite_address }}" 102 - name: GRAPHITE_UUID 103 valueFrom: 104 secretKeyRef: 105 name: doppler-global-secrets 106 key: PAM_GRAPHITE_UUID 107 {{- $base_url := default .Values.cluster.delivery.url .Values.envs.validation_endpoints.base_url }} 108 - name: VIDEO_MAPPER_URL 109 value: "{{ $base_url }}/{{ .Values.envs.validation_endpoints.video_mapper }}" 110 - name: UPP_INTERNAL_ARTICLE_VALIDATOR_URL 111 value: "{{ $base_url }}/{{ .Values.envs.validation_endpoints.upp_internal_article_validator }}" 112 - name: UPP_LIST_VALIDATOR_URL 113 value: "{{ $base_url }}/{{ .Values.envs.validation_endpoints.upp_list_validator }}" 114 - name: UPP_PAGE_VALIDATOR_URL 115 value: "{{ $base_url }}/{{ .Values.envs.validation_endpoints.upp_page_validator }}" 116 - name: UPP_INTERNAL_CPH_VALIDATOR_URL 117 value: "{{ $base_url }}/{{ .Values.envs.validation_endpoints.upp_internal_cph_validator }}" 118 - name: UPP_IMAGE_VALIDATOR_URL 119 value: "{{ $base_url }}/{{ .Values.envs.validation_endpoints.upp_image_validator }}" 120 - name: UPP_IMAGE_SET_VALIDATOR_URL 121 value: "{{ $base_url }}/{{ .Values.envs.validation_endpoints.upp_image_set_validator }}" 122 - name: UPP_GRAPHIC_VALIDATOR_URL 123 value: "{{ $base_url }}/{{ .Values.envs.validation_endpoints.upp_graphic_validator }}" 124 - name: UPP_CONTENT_COLLECTION_VALIDATOR_URL 125 value: "{{ $base_url }}/{{ .Values.envs.validation_endpoints.upp_content_collection_validator }}" 126 - name: UPP_INTERNAL_LIVE_BLOG_PACKAGE_VALIDATOR_URL 127 value: "{{ $base_url }}/{{ .Values.envs.validation_endpoints.upp_internal_live_blog_package_validator }}" 128 - name: UPP_INTERNAL_LIVE_BLOG_POST_VALIDATOR_URL 129 value: "{{ $base_url }}/{{ .Values.envs.validation_endpoints.upp_internal_live_blog_post_validator }}" 130 - name: UPP_AUDIO_VALIDATOR_URL 131 value: "{{ $base_url }}/{{ .Values.envs.validation_endpoints.upp_audio_validator }}" 132 - name: UPP_CLIP_VALIDATOR_URL 133 value: "{{ $base_url }}/{{ .Values.envs.validation_endpoints.upp_clip_validator }}" 134 - name: UPP_CLIP_SET_VALIDATOR_URL 135 value: "{{ $base_url }}/{{ .Values.envs.validation_endpoints.upp_clip_set_validator }}" 136 - name: UPP_CONTENT_RELATION_VALIDATOR_URL 137 value: "{{ $base_url }}/{{ .Values.envs.validation_endpoints.upp_content_relation_validator }}" 138 - name: UPP_CUSTOM_CODE_COMPONENT_VALIDATOR_URL 139 value: "{{ $base_url }}/{{ .Values.envs.validation_endpoints.upp_custom_code_component_validator }}" 140 ports: 141 - containerPort: 8080 142 livenessProbe: 143 tcpSocket: 144 port: 8080 145 initialDelaySeconds: 30 146 readinessProbe: 147 tcpSocket: 148 port: 8080 149 initialDelaySeconds: 10 150 periodSeconds: 30 151 volumeMounts: 152 - name: read-envs-config 153 mountPath: {{ .Values.volumes.read_envs_config_mount_path }} 154 - name: pam-secrets 155 mountPath: {{ .Values.volumes.secrets_mount_path }} 156 volumes: 157 - name: pam-secrets 158 secret: 159 secretName: doppler-global-secrets 160 items: 161 - key: PAM_READ_CREDENTIALS 162 path: {{ .Values.volumes.read_env_credentials_file_name }} 163 - key: PAM_VALIDATOR_CREDENTIALS 164 path: {{ .Values.volumes.validation_credentials_file_name }} 165 - name: read-envs-config 166 configMap: 167 name: global-config 168 items: 169 - key: pam.read.environments 170 path: {{ .Values.volumes.read_envs_config_file_name }} 171 172 # corresponding secret template 173 # kind: Secret 174 # apiVersion: v1 175 # metadata: 176 # name: publish-availability-monitor-secrets 177 # namespace: default 178 # data: 179 # read-credentials: 180 # [ 181 # { 182 # "env-name": "k8s", 183 # "username": "foo", 184 # "password": "bar" 185 # } 186 # ] 187 # 188 # validator-credentials: 189 # { 190 # "username": "oof", 191 # "password": "baz" 192 # } 193 # 194 # list_notifications_push.api_key: fooBar 195 # notifications_push.api_key: foobaz