完成 72绵阳项目 71雄安集团监管平台 大量优化更新
This commit is contained in:
280
72-202602-绵阳飞服/k8s-middle/helm-influxdb.yaml
Normal file
280
72-202602-绵阳飞服/k8s-middle/helm-influxdb.yaml
Normal file
@@ -0,0 +1,280 @@
|
||||
---
|
||||
# Source: influxdb/templates/networkpolicy.yaml
|
||||
kind: NetworkPolicy
|
||||
apiVersion: networking.k8s.io/v1
|
||||
metadata:
|
||||
name: helm-influxdb
|
||||
namespace: sc-my-uav-260202
|
||||
labels:
|
||||
app.kubernetes.io/instance: helm-influxdb
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: influxdb
|
||||
app.kubernetes.io/version: 2.7.11
|
||||
helm.sh/chart: influxdb-6.6.11
|
||||
spec:
|
||||
podSelector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/instance: helm-influxdb
|
||||
app.kubernetes.io/name: influxdb
|
||||
app.kubernetes.io/component: influxdb
|
||||
policyTypes:
|
||||
- Ingress
|
||||
- Egress
|
||||
egress:
|
||||
- {}
|
||||
ingress:
|
||||
# Allow inbound connections
|
||||
- ports:
|
||||
- port: 8086
|
||||
protocol: TCP
|
||||
- port: 8088
|
||||
protocol: TCP
|
||||
---
|
||||
# Source: influxdb/templates/serviceaccount.yaml
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: helm-influxdb
|
||||
namespace: sc-my-uav-260202
|
||||
labels:
|
||||
app.kubernetes.io/instance: helm-influxdb
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: influxdb
|
||||
app.kubernetes.io/version: 2.7.11
|
||||
helm.sh/chart: influxdb-6.6.11
|
||||
app.kubernetes.io/component: influxdb
|
||||
automountServiceAccountToken: false
|
||||
---
|
||||
# Source: influxdb/templates/secrets.yaml
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: helm-influxdb
|
||||
namespace: sc-my-uav-260202
|
||||
labels:
|
||||
app.kubernetes.io/instance: helm-influxdb
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: influxdb
|
||||
app.kubernetes.io/version: 2.7.11
|
||||
helm.sh/chart: influxdb-6.6.11
|
||||
type: Opaque
|
||||
data:
|
||||
admin-user-password: "WTFjJVJoI2ZIMw=="
|
||||
admin-user-token: "WXVubkhKQVNBQWRqMjNyYXNRQVdkNjIxZXJHQVM4MmthcWo="
|
||||
---
|
||||
# Source: influxdb/templates/pvc.yaml
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: helm-influxdb
|
||||
namespace: sc-my-uav-260202
|
||||
labels:
|
||||
app.kubernetes.io/instance: helm-influxdb
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: influxdb
|
||||
app.kubernetes.io/version: 2.7.11
|
||||
helm.sh/chart: influxdb-6.6.11
|
||||
app.kubernetes.io/component: influxdb
|
||||
spec:
|
||||
storageClassName: nfs-prod-distribute
|
||||
accessModes:
|
||||
- "ReadWriteOnce"
|
||||
resources:
|
||||
requests:
|
||||
storage: "8Gi"
|
||||
---
|
||||
# Source: influxdb/templates/service.yaml
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: helm-influxdb
|
||||
namespace: sc-my-uav-260202
|
||||
labels:
|
||||
app.kubernetes.io/instance: helm-influxdb
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: influxdb
|
||||
app.kubernetes.io/version: 2.7.11
|
||||
helm.sh/chart: influxdb-6.6.11
|
||||
app.kubernetes.io/component: influxdb
|
||||
spec:
|
||||
type: ClusterIP
|
||||
sessionAffinity: None
|
||||
ports:
|
||||
- port: 8086
|
||||
targetPort: http
|
||||
protocol: TCP
|
||||
name: http
|
||||
nodePort: null
|
||||
- port: 8088
|
||||
targetPort: rpc
|
||||
protocol: TCP
|
||||
name: rpc
|
||||
nodePort: null
|
||||
selector:
|
||||
app.kubernetes.io/instance: helm-influxdb
|
||||
app.kubernetes.io/name: influxdb
|
||||
app.kubernetes.io/component: influxdb
|
||||
---
|
||||
# Source: influxdb/templates/deployment.yaml
|
||||
kind: Deployment
|
||||
apiVersion: apps/v1
|
||||
metadata:
|
||||
name: helm-influxdb
|
||||
namespace: sc-my-uav-260202
|
||||
labels:
|
||||
app.kubernetes.io/component: influxdb
|
||||
app.kubernetes.io/instance: helm-influxdb
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: influxdb
|
||||
app.kubernetes.io/version: 2.7.11
|
||||
helm.sh/chart: influxdb-6.6.11
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/component: influxdb
|
||||
app.kubernetes.io/instance: helm-influxdb
|
||||
app.kubernetes.io/name: influxdb
|
||||
template:
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
app.kubernetes.io/component: influxdb
|
||||
app.kubernetes.io/instance: helm-influxdb
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/name: influxdb
|
||||
app.kubernetes.io/version: 2.7.11
|
||||
helm.sh/chart: influxdb-6.6.11
|
||||
spec:
|
||||
volumes:
|
||||
- name: empty-dir
|
||||
emptyDir: {}
|
||||
- name: influxdb-credentials
|
||||
secret:
|
||||
secretName: helm-influxdb
|
||||
defaultMode: 420
|
||||
- name: data
|
||||
persistentVolumeClaim:
|
||||
claimName: helm-influxdb
|
||||
containers:
|
||||
- name: influxdb
|
||||
image: 192.168.1.4:8033/cmii/influxdb:2.7.11-debian-12-r19
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 8086
|
||||
protocol: TCP
|
||||
- name: rpc
|
||||
containerPort: 8088
|
||||
protocol: TCP
|
||||
env:
|
||||
- name: BITNAMI_DEBUG
|
||||
value: 'true'
|
||||
- name: POD_IP
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
apiVersion: v1
|
||||
fieldPath: status.podIP
|
||||
- name: INFLUXDB_HTTP_AUTH_ENABLED
|
||||
value: 'true'
|
||||
- name: INFLUXDB_CREATE_USER_TOKEN
|
||||
value: 'no'
|
||||
- name: INFLUXDB_ADMIN_USER
|
||||
value: cmlc
|
||||
- name: INFLUXDB_ADMIN_USER_PASSWORD_FILE
|
||||
value: /opt/bitnami/influxdb/secrets/admin-user-password
|
||||
- name: INFLUXDB_ADMIN_USER_TOKEN_FILE
|
||||
value: /opt/bitnami/influxdb/secrets/admin-user-token
|
||||
- name: INFLUXDB_ADMIN_BUCKET
|
||||
value: home
|
||||
- name: INFLUXDB_ADMIN_ORG
|
||||
value: docs
|
||||
resources:
|
||||
limits:
|
||||
cpu: '4'
|
||||
ephemeral-storage: 4Gi
|
||||
memory: 4Gi
|
||||
requests:
|
||||
cpu: '2'
|
||||
ephemeral-storage: 50Mi
|
||||
memory: 4Gi
|
||||
volumeMounts:
|
||||
- name: empty-dir
|
||||
mountPath: /tmp
|
||||
subPath: tmp-dir
|
||||
- name: empty-dir
|
||||
mountPath: /opt/bitnami/influxdb/etc
|
||||
subPath: app-conf-dir
|
||||
- name: influxdb-credentials
|
||||
mountPath: /opt/bitnami/influxdb/secrets/
|
||||
- name: data
|
||||
mountPath: /bitnami/influxdb
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: http
|
||||
scheme: HTTP
|
||||
initialDelaySeconds: 180
|
||||
timeoutSeconds: 30
|
||||
periodSeconds: 45
|
||||
successThreshold: 1
|
||||
failureThreshold: 6
|
||||
readinessProbe:
|
||||
exec:
|
||||
command:
|
||||
- bash
|
||||
- '-c'
|
||||
- |
|
||||
. /opt/bitnami/scripts/libinfluxdb.sh
|
||||
|
||||
influxdb_env
|
||||
export INFLUX_USERNAME="$INFLUXDB_ADMIN_USER"
|
||||
export INFLUX_PASSWORD="$INFLUXDB_ADMIN_USER_PASSWORD"
|
||||
|
||||
timeout 29s influx ping --host http://$POD_IP:8086
|
||||
initialDelaySeconds: 120
|
||||
timeoutSeconds: 30
|
||||
periodSeconds: 45
|
||||
successThreshold: 1
|
||||
failureThreshold: 6
|
||||
terminationMessagePath: /dev/termination-log
|
||||
terminationMessagePolicy: File
|
||||
imagePullPolicy: IfNotPresent
|
||||
securityContext:
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
privileged: false
|
||||
seLinuxOptions: {}
|
||||
runAsUser: 1001
|
||||
runAsGroup: 1001
|
||||
runAsNonRoot: true
|
||||
readOnlyRootFilesystem: true
|
||||
allowPrivilegeEscalation: false
|
||||
seccompProfile:
|
||||
type: RuntimeDefault
|
||||
restartPolicy: Always
|
||||
terminationGracePeriodSeconds: 30
|
||||
dnsPolicy: ClusterFirst
|
||||
serviceAccountName: helm-influxdb
|
||||
serviceAccount: helm-influxdb
|
||||
securityContext:
|
||||
fsGroup: 1001
|
||||
fsGroupChangePolicy: Always
|
||||
affinity:
|
||||
nodeAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
nodeSelectorTerms:
|
||||
- matchExpressions:
|
||||
- key: uavcloud.env
|
||||
operator: In
|
||||
values:
|
||||
- mianyang
|
||||
schedulerName: default-scheduler
|
||||
strategy:
|
||||
type: RollingUpdate
|
||||
rollingUpdate:
|
||||
maxUnavailable: 25%
|
||||
maxSurge: 25%
|
||||
revisionHistoryLimit: 10
|
||||
progressDeadlineSeconds: 600
|
||||
|
||||
Reference in New Issue
Block a user