# Copyright 2022 Dell Inc. or its subsidiaries. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. --- - name: Timescaledb pod definition kubernetes.core.k8s: state: present definition: apiVersion: apps/v1 kind: StatefulSet metadata: name: "{{ timescaledb_k8s_name }}" namespace: "{{ namespace }}" spec: selector: matchLabels: app: "{{ timescaledb_k8s_name }}" serviceName: "{{ timescaledb_k8s_name }}" replicas: "{{ statefulset_replicas }}" template: metadata: labels: app: "{{ timescaledb_k8s_name }}" spec: volumes: - name: telemetry-reference-tools hostPath: path: "{{ mount_location + idrac_telemetry_folder_name }}" type: Directory - name: timescaledb-pvc persistentVolumeClaim: claimName: "{{ pvc_name }}" - name: timezone hostPath: path: "{{ zoneinfo_dir + timezone }}" type: File containers: - name: timescale image: timescale/timescaledb:latest-pg12 imagePullPolicy: "IfNotPresent" volumeMounts: - mountPath: /go/src/github.com/telemetry-reference-tools name: telemetry-reference-tools - mountPath: /var/lib/postgresql/ name: timescaledb-pvc - mountPath: /etc/localtime name: timezone workingDir: /go/src/github.com/telemetry-reference-tools env: - name: node.name value: timescale - name: POSTGRES_USER valueFrom: secretKeyRef: name: "{{ secrets_name }}" key: timescaledb_user - name: POSTGRES_PASSWORD valueFrom: secretKeyRef: name: "{{ secrets_name }}" key: timescaledb_password - name: TIMESCALE_DB value: "{{ timescaledb_name }}" ports: - containerPort: "{{ timescaledb_container_port }}"