mirror of
https://gitee.com/pnoker/iot-dc3.git
synced 2026-11-04 04:02:30 +08:00
- add the canonical AGPL header to the six agentic application yml files and the two python scripts that lacked one - add the header to all 79 kustomize, helm, and grafana yaml files, including the k8s driver template which regenerates the 36 driver manifests - verified: the k8s yaml files parse (multi-document aware), the python scripts compile, and the regenerated drivers differ only by the header
107 lines
3.0 KiB
YAML
107 lines
3.0 KiB
YAML
#
|
|
# Copyright 2016-present the IoT DC3 original author or authors.
|
|
#
|
|
# This program is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU Affero General Public License as
|
|
# published by the Free Software Foundation, either version 3 of the
|
|
# License, or (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU Affero General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU Affero General Public License
|
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
#
|
|
|
|
apiVersion: apps/v1
|
|
kind: StatefulSet
|
|
metadata:
|
|
name: dc3-postgres
|
|
namespace: dc3
|
|
labels:
|
|
app.kubernetes.io/name: dc3-postgres
|
|
app.kubernetes.io/part-of: iot-dc3
|
|
spec:
|
|
serviceName: dc3-postgres
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: dc3-postgres
|
|
updateStrategy:
|
|
type: RollingUpdate
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: dc3-postgres
|
|
spec:
|
|
terminationGracePeriodSeconds: 60
|
|
containers:
|
|
- name: dc3-postgres
|
|
# Built locally from dc3/dependencies/postgres (see scripts/push-images.sh);
|
|
# pulls the dc3-postgres-base image and layers the initdb seed SQL.
|
|
image: pnoker/dc3-postgres:2026.6
|
|
imagePullPolicy: IfNotPresent
|
|
env:
|
|
- name: POSTGRES_DB
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: dc3-config
|
|
key: POSTGRES_DB
|
|
- name: POSTGRES_USER
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: dc3-secrets
|
|
key: POSTGRES_USERNAME
|
|
- name: POSTGRES_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: dc3-secrets
|
|
key: POSTGRES_PASSWORD
|
|
ports:
|
|
- name: postgres
|
|
containerPort: 5432
|
|
resources:
|
|
requests:
|
|
cpu: 500m
|
|
memory: 512Mi
|
|
limits:
|
|
cpu: "2"
|
|
memory: 2048Mi
|
|
readinessProbe:
|
|
exec:
|
|
command:
|
|
- pg_isready
|
|
- -U
|
|
- dc3
|
|
- -d
|
|
- dc3
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 10
|
|
timeoutSeconds: 5
|
|
failureThreshold: 10
|
|
livenessProbe:
|
|
exec:
|
|
command:
|
|
- pg_isready
|
|
- -U
|
|
- dc3
|
|
- -d
|
|
- dc3
|
|
initialDelaySeconds: 60
|
|
periodSeconds: 30
|
|
timeoutSeconds: 5
|
|
failureThreshold: 6
|
|
volumeMounts:
|
|
- name: data
|
|
mountPath: /var/lib/postgresql
|
|
volumeClaimTemplates:
|
|
- metadata:
|
|
name: data
|
|
spec:
|
|
accessModes: [ "ReadWriteOnce" ]
|
|
resources:
|
|
requests:
|
|
storage: 20Gi
|