12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- ---
- - 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 }}"
- 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
- 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 }}"
|