diff --git a/examples/chatgpt-next-web/chatgpt-next-web.yaml b/examples/chatgpt-next-web/chatgpt-next-web.yaml index a697eea..3180767 100644 --- a/examples/chatgpt-next-web/chatgpt-next-web.yaml +++ b/examples/chatgpt-next-web/chatgpt-next-web.yaml @@ -91,26 +91,27 @@ spec: value: "123456" - name: CODE value: "123456" - livenessProbe: - tcpSocket: - port: 3000 - initialDelaySeconds: 300 - periodSeconds: 10 - timeoutSeconds: 30 - failureThreshold: 3 - successThreshold: 3 - readinessProbe: - tcpSocket: - port: 3000 - initialDelaySeconds: 10 - periodSeconds: 5 - successThreshold: 3 startupProbe: + tcpSocket: + port: 3000 + initialDelaySeconds: 0 + periodSeconds: 10 + timeoutSeconds: 1 + failureThreshold: 30 + readinessProbe: + tcpSocket: + port: 3000 + initialDelaySeconds: 5 + periodSeconds: 5 + timeoutSeconds: 1 + successThreshold: 1 + livenessProbe: tcpSocket: port: 3000 initialDelaySeconds: 10 periodSeconds: 5 - successThreshold: 3 + timeoutSeconds: 1 + failureThreshold: 3 nodeSelector: node.k8s.hty1024.com/type: app diff --git a/examples/drawio/drawio.yaml b/examples/drawio/drawio.yaml index 4b731fa..cb8c8cc 100644 --- a/examples/drawio/drawio.yaml +++ b/examples/drawio/drawio.yaml @@ -169,26 +169,27 @@ spec: env: - name: DRAWIO_SERVER_URL value: "http://localhost:8080" - livenessProbe: - tcpSocket: - port: 8000 - initialDelaySeconds: 300 - periodSeconds: 10 - timeoutSeconds: 30 - failureThreshold: 3 - successThreshold: 3 - readinessProbe: - tcpSocket: - port: 8000 - initialDelaySeconds: 10 - periodSeconds: 5 - successThreshold: 3 startupProbe: + tcpSocket: + port: 8000 + initialDelaySeconds: 0 + periodSeconds: 10 + timeoutSeconds: 1 + failureThreshold: 30 + readinessProbe: + tcpSocket: + port: 8000 + initialDelaySeconds: 5 + periodSeconds: 5 + timeoutSeconds: 1 + successThreshold: 1 + livenessProbe: tcpSocket: port: 8000 initialDelaySeconds: 10 periodSeconds: 5 - successThreshold: 3 + timeoutSeconds: 1 + failureThreshold: 3 - name: drawio image: jgraph/drawio:24.7.17 volumeMounts: @@ -207,26 +208,27 @@ spec: # value: "http://plantuml-server:8080" - name: EXPORT_URL value: "http://localhost:8000" - livenessProbe: - tcpSocket: - port: 8080 - initialDelaySeconds: 300 - periodSeconds: 10 - timeoutSeconds: 30 - failureThreshold: 3 - successThreshold: 3 - readinessProbe: - tcpSocket: - port: 8080 - initialDelaySeconds: 10 - periodSeconds: 5 - successThreshold: 3 startupProbe: + tcpSocket: + port: 8080 + initialDelaySeconds: 0 + periodSeconds: 10 + timeoutSeconds: 1 + failureThreshold: 30 + readinessProbe: + tcpSocket: + port: 8080 + initialDelaySeconds: 5 + periodSeconds: 5 + timeoutSeconds: 1 + successThreshold: 1 + livenessProbe: tcpSocket: port: 8080 initialDelaySeconds: 10 periodSeconds: 5 - successThreshold: 3 + timeoutSeconds: 1 + failureThreshold: 3 nodeSelector: node.k8s.hty1024.com/type: app diff --git a/examples/geminiprochat/geminiprochat.yaml b/examples/geminiprochat/geminiprochat.yaml index 8696611..63b90b8 100644 --- a/examples/geminiprochat/geminiprochat.yaml +++ b/examples/geminiprochat/geminiprochat.yaml @@ -89,6 +89,27 @@ spec: value: "123456" - name: SITE_PASSWORD value: "123456" + startupProbe: + tcpSocket: + port: 3000 + initialDelaySeconds: 0 + periodSeconds: 10 + timeoutSeconds: 1 + failureThreshold: 30 + readinessProbe: + tcpSocket: + port: 3000 + initialDelaySeconds: 5 + periodSeconds: 5 + timeoutSeconds: 1 + successThreshold: 1 + livenessProbe: + tcpSocket: + port: 3000 + initialDelaySeconds: 10 + periodSeconds: 5 + timeoutSeconds: 1 + failureThreshold: 3 nodeSelector: node.k8s.hty1024.com/type: app diff --git a/examples/gitea/gitea.yaml b/examples/gitea/gitea.yaml index c5ef398..077f890 100644 --- a/examples/gitea/gitea.yaml +++ b/examples/gitea/gitea.yaml @@ -158,26 +158,27 @@ spec: readOnly: true - name: hty1024-app-gitea-data mountPath: /data - livenessProbe: - tcpSocket: - port: 3000 - initialDelaySeconds: 300 - periodSeconds: 10 - timeoutSeconds: 30 - failureThreshold: 3 - successThreshold: 3 - readinessProbe: - tcpSocket: - port: 3000 - initialDelaySeconds: 10 - periodSeconds: 5 - successThreshold: 3 startupProbe: + tcpSocket: + port: 3000 + initialDelaySeconds: 0 + periodSeconds: 10 + timeoutSeconds: 1 + failureThreshold: 30 + readinessProbe: + tcpSocket: + port: 3000 + initialDelaySeconds: 5 + periodSeconds: 5 + timeoutSeconds: 1 + successThreshold: 1 + livenessProbe: tcpSocket: port: 3000 initialDelaySeconds: 10 periodSeconds: 5 - successThreshold: 3 + timeoutSeconds: 1 + failureThreshold: 3 nodeSelector: node.k8s.hty1024.com/type: app diff --git a/examples/halo/halo.yaml b/examples/halo/halo.yaml index 28f0869..7b3666d 100644 --- a/examples/halo/halo.yaml +++ b/examples/halo/halo.yaml @@ -173,26 +173,27 @@ spec: value: "admin" - name: HALO_CACHE value: "memory" - livenessProbe: - tcpSocket: - port: 8090 - initialDelaySeconds: 300 - periodSeconds: 10 - timeoutSeconds: 30 - failureThreshold: 3 - successThreshold: 3 - readinessProbe: - tcpSocket: - port: 8090 - initialDelaySeconds: 10 - periodSeconds: 5 - successThreshold: 3 startupProbe: + tcpSocket: + port: 8090 + initialDelaySeconds: 0 + periodSeconds: 10 + timeoutSeconds: 1 + failureThreshold: 30 + readinessProbe: + tcpSocket: + port: 8090 + initialDelaySeconds: 5 + periodSeconds: 5 + timeoutSeconds: 1 + successThreshold: 1 + livenessProbe: tcpSocket: port: 8090 initialDelaySeconds: 10 periodSeconds: 5 - successThreshold: 3 + timeoutSeconds: 1 + failureThreshold: 3 nodeSelector: node.k8s.hty1024.com/type: app diff --git a/examples/kiwix-serve/kiwix-serve.yaml b/examples/kiwix-serve/kiwix-serve.yaml index 7e4e8bc..c99fd3c 100644 --- a/examples/kiwix-serve/kiwix-serve.yaml +++ b/examples/kiwix-serve/kiwix-serve.yaml @@ -158,26 +158,27 @@ spec: readOnly: true - name: hty1024-app-kiwix-serve-data mountPath: /data - livenessProbe: - tcpSocket: - port: 10080 - initialDelaySeconds: 300 - periodSeconds: 10 - timeoutSeconds: 30 - failureThreshold: 3 - successThreshold: 3 - readinessProbe: - tcpSocket: - port: 10080 - initialDelaySeconds: 10 - periodSeconds: 5 - successThreshold: 3 startupProbe: + tcpSocket: + port: 10080 + initialDelaySeconds: 0 + periodSeconds: 10 + timeoutSeconds: 1 + failureThreshold: 30 + readinessProbe: + tcpSocket: + port: 10080 + initialDelaySeconds: 5 + periodSeconds: 5 + timeoutSeconds: 1 + successThreshold: 1 + livenessProbe: tcpSocket: port: 10080 initialDelaySeconds: 10 periodSeconds: 5 - successThreshold: 3 + timeoutSeconds: 1 + failureThreshold: 3 nodeSelector: node.k8s.hty1024.com/type: app diff --git a/examples/mariadb/mariadb-10-cluster.yaml b/examples/mariadb/10/mariadb-10-cluster.yaml similarity index 98% rename from examples/mariadb/mariadb-10-cluster.yaml rename to examples/mariadb/10/mariadb-10-cluster.yaml index d150f9e..cf328fe 100644 --- a/examples/mariadb/mariadb-10-cluster.yaml +++ b/examples/mariadb/10/mariadb-10-cluster.yaml @@ -524,25 +524,26 @@ spec: value: "/tmp/secret-volume/root.key" - name: MYSQL_REPLICATION_MODE value: "slave" - livenessProbe: - tcpSocket: - port: 3306 - initialDelaySeconds: 300 - periodSeconds: 10 - timeoutSeconds: 30 - failureThreshold: 3 - successThreshold: 3 - readinessProbe: - tcpSocket: - port: 3306 - initialDelaySeconds: 10 - periodSeconds: 5 - successThreshold: 3 startupProbe: + tcpSocket: + port: 3306 + initialDelaySeconds: 0 + periodSeconds: 10 + timeoutSeconds: 1 + failureThreshold: 30 + readinessProbe: + tcpSocket: + port: 3306 + initialDelaySeconds: 5 + periodSeconds: 5 + timeoutSeconds: 1 + successThreshold: 1 + livenessProbe: tcpSocket: port: 3306 initialDelaySeconds: 10 periodSeconds: 5 - successThreshold: 3 + timeoutSeconds: 1 + failureThreshold: 3 nodeSelector: node.k8s.hty1024.com/type: app diff --git a/examples/mariadb/mariadb-10-single.yaml b/examples/mariadb/10/mariadb-10-single.yaml similarity index 96% rename from examples/mariadb/mariadb-10-single.yaml rename to examples/mariadb/10/mariadb-10-single.yaml index 2e143d0..510bbbe 100644 --- a/examples/mariadb/mariadb-10-single.yaml +++ b/examples/mariadb/10/mariadb-10-single.yaml @@ -215,26 +215,27 @@ spec: env: - name: MYSQL_ROOT_PASSWORD_FILE value: "/tmp/secret-volume/root.key" - livenessProbe: - tcpSocket: - port: 3306 - initialDelaySeconds: 300 - periodSeconds: 10 - timeoutSeconds: 30 - failureThreshold: 3 - successThreshold: 3 - readinessProbe: - tcpSocket: - port: 3306 - initialDelaySeconds: 10 - periodSeconds: 5 - successThreshold: 3 startupProbe: + tcpSocket: + port: 3306 + initialDelaySeconds: 0 + periodSeconds: 10 + timeoutSeconds: 1 + failureThreshold: 30 + readinessProbe: + tcpSocket: + port: 3306 + initialDelaySeconds: 5 + periodSeconds: 5 + timeoutSeconds: 1 + successThreshold: 1 + livenessProbe: tcpSocket: port: 3306 initialDelaySeconds: 10 periodSeconds: 5 - successThreshold: 3 + timeoutSeconds: 1 + failureThreshold: 3 nodeSelector: node.k8s.hty1024.com/type: app diff --git a/examples/mariadb/11/mariadb-11-cluster.yaml b/examples/mariadb/11/mariadb-11-cluster.yaml new file mode 100644 index 0000000..bc34ef4 --- /dev/null +++ b/examples/mariadb/11/mariadb-11-cluster.yaml @@ -0,0 +1,549 @@ +--- + +# 创建 Namespace +apiVersion: v1 +kind: Namespace +metadata: + name: hty1024-db + +--- + +# 创建 StorageClass +apiVersion: storage.k8s.io/v1 +kind: StorageClass +metadata: + name: storage-local-mariadb + labels: + app.k8s.hty1024.com/env: prod + app.k8s.hty1024.com/type: db + app.k8s.hty1024.com/name: mariadb + app.k8s.hty1024.com/version: 11.6.2 + app.k8s.hty1024.com/resources: storageClass +provisioner: kubernetes.io/no-provisioner +reclaimPolicy: Retain +volumeBindingMode: WaitForFirstConsumer + +--- + +# 创建 PersistentVolume +## master +apiVersion: v1 +kind: PersistentVolume +metadata: + name: hty1024-db-mariadb-pv-master + labels: + app.k8s.hty1024.com/env: prod + app.k8s.hty1024.com/type: db + app.k8s.hty1024.com/name: mariadb + app.k8s.hty1024.com/version: 11.6.2 + app.k8s.hty1024.com/resources: persistentVolume + app.k8s.hty1024.com/role: master +spec: + capacity: + storage: 100Gi + volumeMode: Filesystem + accessModes: + - ReadWriteOnce + persistentVolumeReclaimPolicy: Retain + storageClassName: storage-local-mariadb + local: + path: /app/mariadb/data/master + nodeAffinity: + required: + nodeSelectorTerms: + - matchExpressions: + - key: node.k8s.hty1024.com/type + operator: In + values: + - app + +--- + +## slave +apiVersion: v1 +kind: PersistentVolume +metadata: + name: hty1024-db-mariadb-pv-slave + labels: + app.k8s.hty1024.com/env: prod + app.k8s.hty1024.com/type: db + app.k8s.hty1024.com/name: mariadb + app.k8s.hty1024.com/version: 11.6.2 + app.k8s.hty1024.com/resources: persistentVolume + app.k8s.hty1024.com/role: slave +spec: + capacity: + storage: 100Gi + volumeMode: Filesystem + accessModes: + - ReadWriteOnce + persistentVolumeReclaimPolicy: Retain + storageClassName: storage-local-mariadb + local: + path: /app/mariadb/data/slave + nodeAffinity: + required: + nodeSelectorTerms: + - matchExpressions: + - key: node.k8s.hty1024.com/type + operator: In + values: + - app + +--- + +# 创建 PersistentVolumeClaim +## master +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: hty1024-db-mariadb-pvc-master + namespace: hty1024-db + labels: + app.k8s.hty1024.com/env: prod + app.k8s.hty1024.com/type: db + app.k8s.hty1024.com/name: mariadb + app.k8s.hty1024.com/version: 11.6.2 + app.k8s.hty1024.com/resources: persistentVolumeClaim + app.k8s.hty1024.com/role: master +spec: + resources: + requests: + storage: 100Gi + volumeMode: Filesystem + accessModes: + - ReadWriteOnce + storageClassName: storage-local-mariadb + +--- + +## slave +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: hty1024-db-mariadb-pvc-slave + namespace: hty1024-db + labels: + app.k8s.hty1024.com/env: prod + app.k8s.hty1024.com/type: db + app.k8s.hty1024.com/name: mariadb + app.k8s.hty1024.com/version: 11.6.2 + app.k8s.hty1024.com/resources: persistentVolumeClaim + app.k8s.hty1024.com/role: slave +spec: + resources: + requests: + storage: 100Gi + volumeMode: Filesystem + accessModes: + - ReadWriteOnce + storageClassName: storage-local-mariadb + +--- + +# 创建 ConfigMap +## master +### my.cnf +apiVersion: v1 +kind: ConfigMap +metadata: + name: hty1024-db-mariadb-cm-master + namespace: hty1024-db + labels: + app.k8s.hty1024.com/env: prod + app.k8s.hty1024.com/type: db + app.k8s.hty1024.com/name: mariadb + app.k8s.hty1024.com/version: 11.6.2 + app.k8s.hty1024.com/resources: configMap + app.k8s.hty1024.com/role: master +data: + my.cnf: | + [mysqld] + max_connections = 1000 + character-set-server = utf8mb4 + collation-server = utf8mb4_unicode_ci + + server-id = 1 + report_host = master + + log_bin = master-bin + log_error = master-bin.err + binlog_format = mixed + binlog_expire_logs_seconds = 604800 + max_binlog_size = 1G + + binlog-ignore-db = mysql + binlog-ignore-db = sys + binlog-ignore-db = information_schema + binlog-ignore-db = performance_schema + +--- + +### init.sql +apiVersion: v1 +kind: ConfigMap +metadata: + name: hty1024-db-mariadb-cm-master-init + namespace: hty1024-db + labels: + app.k8s.hty1024.com/env: prod + app.k8s.hty1024.com/type: db + app.k8s.hty1024.com/name: mariadb + app.k8s.hty1024.com/version: 11.6.2 + app.k8s.hty1024.com/resources: configMap + app.k8s.hty1024.com/role: master +data: + init.sql: | + create user 'replication'@'%' identified by '123456'; + grant replication slave, replication client on *.* to 'replication'@'%'; + show grants for 'replication'@'%'; + flush privileges; + +--- + +## slave +### my.cnf +apiVersion: v1 +kind: ConfigMap +metadata: + name: hty1024-db-mariadb-cm-slave + namespace: hty1024-db + labels: + app.k8s.hty1024.com/env: prod + app.k8s.hty1024.com/type: db + app.k8s.hty1024.com/name: mariadb + app.k8s.hty1024.com/version: 11.6.2 + app.k8s.hty1024.com/resources: configMap + app.k8s.hty1024.com/role: slave +data: + my.cnf: | + [mysqld] + max_connections = 1000 + character-set-server = utf8mb4 + collation-server = utf8mb4_unicode_ci + + server-id = 2 + report_host = slave + + replicate_ignore_db = mysql + replicate_ignore_db = sys + replicate_ignore_db = information_schema + replicate_ignore_db = performance_schema + +--- + +### init.sql +apiVersion: v1 +kind: ConfigMap +metadata: + name: hty1024-db-mariadb-cm-slave-init + namespace: hty1024-db + labels: + app.k8s.hty1024.com/env: prod + app.k8s.hty1024.com/type: db + app.k8s.hty1024.com/name: mariadb + app.k8s.hty1024.com/version: 11.6.2 + app.k8s.hty1024.com/resources: configMap + app.k8s.hty1024.com/role: slave +data: + init.sql: | + change master to master_host='hty1024-db-mariadb-service-master.hty1024-db', master_port=3306, master_user='replication', master_password='123456', master_log_file='master-bin.000002', master_log_pos=343; + set global sql_slave_skip_counter=1; + start slave; + +--- + +# 创建 Secret(自定义 MySQL 用户密码) +apiVersion: v1 +kind: Secret +metadata: + name: hty1024-db-mariadb-secret + namespace: hty1024-db + labels: + app.k8s.hty1024.com/env: prod + app.k8s.hty1024.com/type: db + app.k8s.hty1024.com/name: mariadb + app.k8s.hty1024.com/version: 11.6.2 + app.k8s.hty1024.com/resources: secret +type: Opaque +stringData: + root.key: | + 12345678 + replication.key: | + 123456 +immutable: true + +--- + +# 创建 Service +## master +apiVersion: v1 +kind: Service +metadata: + name: hty1024-db-mariadb-service-master + namespace: hty1024-db + labels: + app.k8s.hty1024.com/env: prod + app.k8s.hty1024.com/type: db + app.k8s.hty1024.com/name: mariadb + app.k8s.hty1024.com/version: 11.6.2 + app.k8s.hty1024.com/resources: service + app.k8s.hty1024.com/role: master +spec: + type: ClusterIP + ports: + - port: 3306 + targetPort: 3306 + selector: + app.k8s.hty1024.com/env: prod + app.k8s.hty1024.com/type: db + app.k8s.hty1024.com/name: mariadb + app.k8s.hty1024.com/version: 11.6.2 + app.k8s.hty1024.com/resources: pod + app.k8s.hty1024.com/role: master + +--- + +## slave +apiVersion: v1 +kind: Service +metadata: + name: hty1024-db-mariadb-service-slave + namespace: hty1024-db + labels: + app.k8s.hty1024.com/env: prod + app.k8s.hty1024.com/type: db + app.k8s.hty1024.com/name: mariadb + app.k8s.hty1024.com/version: 11.6.2 + app.k8s.hty1024.com/resources: service + app.k8s.hty1024.com/role: slave +spec: + type: ClusterIP + ports: + - port: 3306 + targetPort: 3306 + selector: + app.k8s.hty1024.com/env: prod + app.k8s.hty1024.com/type: db + app.k8s.hty1024.com/name: mariadb + app.k8s.hty1024.com/version: 11.6.2 + app.k8s.hty1024.com/resources: pod + app.k8s.hty1024.com/role: slave + +--- + +# 创建 StatefulSet +## master +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: hty1024-db-mariadb-statefulset-master + namespace: hty1024-db + labels: + app.k8s.hty1024.com/env: prod + app.k8s.hty1024.com/type: db + app.k8s.hty1024.com/name: mariadb + app.k8s.hty1024.com/version: 11.6.2 + app.k8s.hty1024.com/resources: statefulSet + app.k8s.hty1024.com/role: master +spec: + replicas: 1 + minReadySeconds: 30 + selector: + matchLabels: + app.k8s.hty1024.com/env: prod + app.k8s.hty1024.com/type: db + app.k8s.hty1024.com/name: mariadb + app.k8s.hty1024.com/version: 11.6.2 + app.k8s.hty1024.com/resources: pod + app.k8s.hty1024.com/role: master + template: + metadata: + labels: + app.k8s.hty1024.com/env: prod + app.k8s.hty1024.com/type: db + app.k8s.hty1024.com/name: mariadb + app.k8s.hty1024.com/version: 11.6.2 + app.k8s.hty1024.com/resources: pod + app.k8s.hty1024.com/role: master + spec: + terminationGracePeriodSeconds: 60 + volumes: + - name: localtime + hostPath: + path: /etc/localtime + - name: hty1024-db-mariadb-data-master + persistentVolumeClaim: + claimName: hty1024-db-mariadb-pvc-master + - name: hty1024-db-mariadb-conf-master + configMap: + name: hty1024-db-mariadb-cm-master + items: + - key: my.cnf + path: my.cnf + - name: hty1024-db-mariadb-conf-master-init + configMap: + name: hty1024-db-mariadb-cm-master-init + items: + - key: init.sql + path: init.sql + - name: hty1024-db-mariadb-pwd + secret: + secretName: hty1024-db-mariadb-secret + containers: + - name: mariadb + image: mariadb:11.6.2 + ports: + - name: tcp + containerPort: 3306 + volumeMounts: + - name: localtime + mountPath: /etc/localtime + readOnly: true + - name: hty1024-db-mariadb-data-master + mountPath: /var/lib/mysql + - name: hty1024-db-mariadb-conf-master + mountPath: /etc/mysql/conf.d/ + - name: hty1024-db-mariadb-conf-master-init + mountPath: /docker-entrypoint-initdb.d/ + - name: hty1024-db-mariadb-pwd + mountPath: /tmp/secret-volume + readOnly: true + env: + - name: MYSQL_ROOT_PASSWORD_FILE + value: "/tmp/secret-volume/root.key" + - name: MYSQL_REPLICATION_MODE + value: "master" + - name: MYSQL_REPLICATION_USER + value: "replication" + - name: MYSQL_REPLICATION_PASSWORD_FILE + value: "/tmp/secret-volume/replication.key" + livenessProbe: + tcpSocket: + port: 3306 + initialDelaySeconds: 300 + periodSeconds: 10 + timeoutSeconds: 30 + failureThreshold: 3 + successThreshold: 3 + readinessProbe: + tcpSocket: + port: 3306 + initialDelaySeconds: 10 + periodSeconds: 5 + successThreshold: 3 + startupProbe: + tcpSocket: + port: 3306 + initialDelaySeconds: 10 + periodSeconds: 5 + successThreshold: 3 + nodeSelector: + node.k8s.hty1024.com/type: app + +--- + +## slave +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: hty1024-db-mariadb-statefulset-slave + namespace: hty1024-db + labels: + app.k8s.hty1024.com/env: prod + app.k8s.hty1024.com/type: db + app.k8s.hty1024.com/name: mariadb + app.k8s.hty1024.com/version: 11.6.2 + app.k8s.hty1024.com/resources: statefulSet + app.k8s.hty1024.com/role: slave +spec: + replicas: 1 + minReadySeconds: 30 + selector: + matchLabels: + app.k8s.hty1024.com/env: prod + app.k8s.hty1024.com/type: db + app.k8s.hty1024.com/name: mariadb + app.k8s.hty1024.com/version: 11.6.2 + app.k8s.hty1024.com/resources: pod + app.k8s.hty1024.com/role: slave + template: + metadata: + labels: + app.k8s.hty1024.com/env: prod + app.k8s.hty1024.com/type: db + app.k8s.hty1024.com/name: mariadb + app.k8s.hty1024.com/version: 11.6.2 + app.k8s.hty1024.com/resources: pod + app.k8s.hty1024.com/role: slave + spec: + terminationGracePeriodSeconds: 60 + volumes: + - name: localtime + hostPath: + path: /etc/localtime + - name: hty1024-db-mariadb-data-slave + persistentVolumeClaim: + claimName: hty1024-db-mariadb-pvc-slave + - name: hty1024-db-mariadb-conf-slave + configMap: + name: hty1024-db-mariadb-cm-slave + items: + - key: my.cnf + path: my.cnf + - name: hty1024-db-mariadb-conf-slave-init + configMap: + name: hty1024-db-mariadb-cm-slave-init + items: + - key: init.sql + path: init.sql + - name: hty1024-db-mariadb-pwd + secret: + secretName: hty1024-db-mariadb-secret + containers: + - name: mariadb + image: mariadb:11.6.2 + ports: + - name: tcp + containerPort: 3306 + volumeMounts: + - name: localtime + mountPath: /etc/localtime + readOnly: true + - name: hty1024-db-mariadb-data-slave + mountPath: /var/lib/mysql + - name: hty1024-db-mariadb-conf-slave + mountPath: /etc/mysql/conf.d/ + - name: hty1024-db-mariadb-conf-slave-init + mountPath: /docker-entrypoint-initdb.d/ + - name: hty1024-db-mariadb-pwd + mountPath: /tmp/secret-volume + readOnly: true + env: + - name: MYSQL_ROOT_PASSWORD_FILE + value: "/tmp/secret-volume/root.key" + - name: MYSQL_REPLICATION_MODE + value: "slave" + startupProbe: + tcpSocket: + port: 3306 + initialDelaySeconds: 0 + periodSeconds: 10 + timeoutSeconds: 1 + failureThreshold: 30 + readinessProbe: + tcpSocket: + port: 3306 + initialDelaySeconds: 5 + periodSeconds: 5 + timeoutSeconds: 1 + successThreshold: 1 + livenessProbe: + tcpSocket: + port: 3306 + initialDelaySeconds: 10 + periodSeconds: 5 + timeoutSeconds: 1 + failureThreshold: 3 + nodeSelector: + node.k8s.hty1024.com/type: app diff --git a/examples/mariadb/11/mariadb-11-single.yaml b/examples/mariadb/11/mariadb-11-single.yaml new file mode 100644 index 0000000..6b68f1a --- /dev/null +++ b/examples/mariadb/11/mariadb-11-single.yaml @@ -0,0 +1,241 @@ +--- + +# 创建 Namespace +apiVersion: v1 +kind: Namespace +metadata: + name: hty1024-db + +--- + +# 创建 StorageClass +apiVersion: storage.k8s.io/v1 +kind: StorageClass +metadata: + name: storage-local-mariadb + labels: + app.k8s.hty1024.com/env: prod + app.k8s.hty1024.com/type: db + app.k8s.hty1024.com/name: mariadb + app.k8s.hty1024.com/version: 11.6.2 + app.k8s.hty1024.com/resources: storageClass +provisioner: kubernetes.io/no-provisioner +reclaimPolicy: Retain +volumeBindingMode: WaitForFirstConsumer + +--- + +# 创建 PersistentVolume +apiVersion: v1 +kind: PersistentVolume +metadata: + name: hty1024-db-mariadb-pv + labels: + app.k8s.hty1024.com/env: prod + app.k8s.hty1024.com/type: db + app.k8s.hty1024.com/name: mariadb + app.k8s.hty1024.com/version: 11.6.2 + app.k8s.hty1024.com/resources: persistentVolume +spec: + capacity: + storage: 100Gi + volumeMode: Filesystem + accessModes: + - ReadWriteOnce + persistentVolumeReclaimPolicy: Retain + storageClassName: storage-local-mariadb + local: + path: /app/mariadb/data + nodeAffinity: + required: + nodeSelectorTerms: + - matchExpressions: + - key: node.k8s.hty1024.com/type + operator: In + values: + - app + +--- + +# 创建 PersistentVolumeClaim +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: hty1024-db-mariadb-pvc + namespace: hty1024-db + labels: + app.k8s.hty1024.com/env: prod + app.k8s.hty1024.com/type: db + app.k8s.hty1024.com/name: mariadb + app.k8s.hty1024.com/version: 11.6.2 + app.k8s.hty1024.com/resources: persistentVolumeClaim +spec: + resources: + requests: + storage: 100Gi + volumeMode: Filesystem + accessModes: + - ReadWriteOnce + storageClassName: storage-local-mariadb + +--- + +# 创建 ConfigMap(自定义 my.cnf 文件) +apiVersion: v1 +kind: ConfigMap +metadata: + name: hty1024-db-mariadb-cm + namespace: hty1024-db + labels: + app.k8s.hty1024.com/env: prod + app.k8s.hty1024.com/type: db + app.k8s.hty1024.com/name: mariadb + app.k8s.hty1024.com/version: 11.6.2 + app.k8s.hty1024.com/resources: configMap +data: + my.cnf: | + [mysqld] + max_connections = 1000 + character-set-server = utf8mb4 + collation-server = utf8mb4_unicode_ci + +--- + +# 创建 Secret(自定义 MySQL 用户密码) +apiVersion: v1 +kind: Secret +metadata: + name: hty1024-db-mariadb-secret + namespace: hty1024-db + labels: + app.k8s.hty1024.com/env: prod + app.k8s.hty1024.com/type: db + app.k8s.hty1024.com/name: mariadb + app.k8s.hty1024.com/version: 11.6.2 + app.k8s.hty1024.com/resources: secret +type: Opaque +stringData: + root.key: | + 12345678 +immutable: true + +--- + +# 创建 Service +apiVersion: v1 +kind: Service +metadata: + name: hty1024-db-mariadb-service + namespace: hty1024-db + labels: + app.k8s.hty1024.com/env: prod + app.k8s.hty1024.com/type: db + app.k8s.hty1024.com/name: mariadb + app.k8s.hty1024.com/version: 11.6.2 + app.k8s.hty1024.com/resources: service +spec: + type: ClusterIP + ports: + - port: 3306 + targetPort: 3306 + selector: + app.k8s.hty1024.com/env: prod + app.k8s.hty1024.com/type: db + app.k8s.hty1024.com/name: mariadb + app.k8s.hty1024.com/version: 11.6.2 + app.k8s.hty1024.com/resources: pod + +--- + +# 创建 StatefulSet +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: hty1024-db-mariadb-statefulset + namespace: hty1024-db + labels: + app.k8s.hty1024.com/env: prod + app.k8s.hty1024.com/type: db + app.k8s.hty1024.com/name: mariadb + app.k8s.hty1024.com/version: 11.6.2 + app.k8s.hty1024.com/resources: statefulSet +spec: + replicas: 1 + minReadySeconds: 30 + selector: + matchLabels: + app.k8s.hty1024.com/env: prod + app.k8s.hty1024.com/type: db + app.k8s.hty1024.com/name: mariadb + app.k8s.hty1024.com/version: 11.6.2 + app.k8s.hty1024.com/resources: pod + template: + metadata: + labels: + app.k8s.hty1024.com/env: prod + app.k8s.hty1024.com/type: db + app.k8s.hty1024.com/name: mariadb + app.k8s.hty1024.com/version: 11.6.2 + app.k8s.hty1024.com/resources: pod + spec: + terminationGracePeriodSeconds: 60 + volumes: + - name: localtime + hostPath: + path: /etc/localtime + - name: hty1024-db-mariadb-data + persistentVolumeClaim: + claimName: hty1024-db-mariadb-pvc + - name: hty1024-db-mariadb-conf + configMap: + name: hty1024-db-mariadb-cm + items: + - key: my.cnf + path: my.cnf + - name: hty1024-db-mariadb-pwd + secret: + secretName: hty1024-db-mariadb-secret + containers: + - name: mariadb + image: mariadb:11.6.2 + ports: + - name: tcp + containerPort: 3306 + volumeMounts: + - name: localtime + mountPath: /etc/localtime + readOnly: true + - name: hty1024-db-mariadb-data + mountPath: /var/lib/mysql + - name: hty1024-db-mariadb-conf + mountPath: /etc/mysql/conf.d/ + - name: hty1024-db-mariadb-pwd + mountPath: /tmp/secret-volume + readOnly: true + env: + - name: MYSQL_ROOT_PASSWORD_FILE + value: "/tmp/secret-volume/root.key" + startupProbe: + tcpSocket: + port: 3306 + initialDelaySeconds: 0 + periodSeconds: 10 + timeoutSeconds: 1 + failureThreshold: 30 + readinessProbe: + tcpSocket: + port: 3306 + initialDelaySeconds: 5 + periodSeconds: 5 + timeoutSeconds: 1 + successThreshold: 1 + livenessProbe: + tcpSocket: + port: 3306 + initialDelaySeconds: 10 + periodSeconds: 5 + timeoutSeconds: 1 + failureThreshold: 3 + nodeSelector: + node.k8s.hty1024.com/type: app + diff --git a/examples/mysql/mysql-8-cluster.yaml b/examples/mysql/8/mysql-8-cluster.yaml similarity index 98% rename from examples/mysql/mysql-8-cluster.yaml rename to examples/mysql/8/mysql-8-cluster.yaml index ed597c1..e78cb3f 100644 --- a/examples/mysql/mysql-8-cluster.yaml +++ b/examples/mysql/8/mysql-8-cluster.yaml @@ -524,25 +524,26 @@ spec: value: "/tmp/secret-volume/root.key" - name: MYSQL_REPLICATION_MODE value: "slave" - livenessProbe: - tcpSocket: - port: 3306 - initialDelaySeconds: 300 - periodSeconds: 10 - timeoutSeconds: 30 - failureThreshold: 3 - successThreshold: 3 - readinessProbe: - tcpSocket: - port: 3306 - initialDelaySeconds: 10 - periodSeconds: 5 - successThreshold: 3 startupProbe: + tcpSocket: + port: 3306 + initialDelaySeconds: 0 + periodSeconds: 10 + timeoutSeconds: 1 + failureThreshold: 30 + readinessProbe: + tcpSocket: + port: 3306 + initialDelaySeconds: 5 + periodSeconds: 5 + timeoutSeconds: 1 + successThreshold: 1 + livenessProbe: tcpSocket: port: 3306 initialDelaySeconds: 10 periodSeconds: 5 - successThreshold: 3 + timeoutSeconds: 1 + failureThreshold: 3 nodeSelector: node.k8s.hty1024.com/type: app diff --git a/examples/mysql/mysql-8-single.yaml b/examples/mysql/8/mysql-8-single.yaml similarity index 96% rename from examples/mysql/mysql-8-single.yaml rename to examples/mysql/8/mysql-8-single.yaml index bf3832f..16ad7fe 100644 --- a/examples/mysql/mysql-8-single.yaml +++ b/examples/mysql/8/mysql-8-single.yaml @@ -215,26 +215,27 @@ spec: env: - name: MYSQL_ROOT_PASSWORD_FILE value: "/tmp/secret-volume/root.key" - livenessProbe: - tcpSocket: - port: 3306 - initialDelaySeconds: 300 - periodSeconds: 10 - timeoutSeconds: 30 - failureThreshold: 3 - successThreshold: 3 - readinessProbe: - tcpSocket: - port: 3306 - initialDelaySeconds: 10 - periodSeconds: 5 - successThreshold: 3 startupProbe: + tcpSocket: + port: 3306 + initialDelaySeconds: 0 + periodSeconds: 10 + timeoutSeconds: 1 + failureThreshold: 30 + readinessProbe: + tcpSocket: + port: 3306 + initialDelaySeconds: 5 + periodSeconds: 5 + timeoutSeconds: 1 + successThreshold: 1 + livenessProbe: tcpSocket: port: 3306 initialDelaySeconds: 10 periodSeconds: 5 - successThreshold: 3 + timeoutSeconds: 1 + failureThreshold: 3 nodeSelector: node.k8s.hty1024.com/type: app diff --git a/examples/pgadmin4/pgadmin4.yaml b/examples/pgadmin4/pgadmin4.yaml index fcf7510..65416b6 100644 --- a/examples/pgadmin4/pgadmin4.yaml +++ b/examples/pgadmin4/pgadmin4.yaml @@ -87,25 +87,26 @@ spec: value: "test@hty1024.com" - name: PGADMIN_DEFAULT_PASSWORD value: "123456" - livenessProbe: - tcpSocket: - port: 80 - initialDelaySeconds: 300 - periodSeconds: 10 - timeoutSeconds: 30 - failureThreshold: 3 - successThreshold: 3 - readinessProbe: - tcpSocket: - port: 80 - initialDelaySeconds: 10 - periodSeconds: 5 - successThreshold: 3 startupProbe: + tcpSocket: + port: 80 + initialDelaySeconds: 0 + periodSeconds: 10 + timeoutSeconds: 1 + failureThreshold: 30 + readinessProbe: + tcpSocket: + port: 80 + initialDelaySeconds: 5 + periodSeconds: 5 + timeoutSeconds: 1 + successThreshold: 1 + livenessProbe: tcpSocket: port: 80 initialDelaySeconds: 10 periodSeconds: 5 - successThreshold: 3 + timeoutSeconds: 1 + failureThreshold: 3 nodeSelector: node.k8s.hty1024.com/type: app diff --git a/examples/phpmyadmin/phpmyadmin.yaml b/examples/phpmyadmin/phpmyadmin.yaml index 47f75a7..ef7bfd0 100644 --- a/examples/phpmyadmin/phpmyadmin.yaml +++ b/examples/phpmyadmin/phpmyadmin.yaml @@ -85,25 +85,26 @@ spec: env: - name: PMA_ARBITRARY value: "1" - livenessProbe: - tcpSocket: - port: 80 - initialDelaySeconds: 300 - periodSeconds: 10 - timeoutSeconds: 30 - failureThreshold: 3 - successThreshold: 3 - readinessProbe: - tcpSocket: - port: 80 - initialDelaySeconds: 10 - periodSeconds: 5 - successThreshold: 3 startupProbe: + tcpSocket: + port: 80 + initialDelaySeconds: 0 + periodSeconds: 10 + timeoutSeconds: 1 + failureThreshold: 30 + readinessProbe: + tcpSocket: + port: 80 + initialDelaySeconds: 5 + periodSeconds: 5 + timeoutSeconds: 1 + successThreshold: 1 + livenessProbe: tcpSocket: port: 80 initialDelaySeconds: 10 periodSeconds: 5 - successThreshold: 3 + timeoutSeconds: 1 + failureThreshold: 3 nodeSelector: node.k8s.hty1024.com/type: app diff --git a/examples/postgres/postgres-16-single.yaml b/examples/postgres/16/postgres-16-single.yaml similarity index 95% rename from examples/postgres/postgres-16-single.yaml rename to examples/postgres/16/postgres-16-single.yaml index 8bbc637..58364e6 100644 --- a/examples/postgres/postgres-16-single.yaml +++ b/examples/postgres/16/postgres-16-single.yaml @@ -186,26 +186,27 @@ spec: env: - name: POSTGRES_PASSWORD_FILE value: "/tmp/secret-volume/postgres.key" - livenessProbe: - tcpSocket: - port: 5432 - initialDelaySeconds: 300 - periodSeconds: 10 - timeoutSeconds: 30 - failureThreshold: 3 - successThreshold: 3 - readinessProbe: - tcpSocket: - port: 5432 - initialDelaySeconds: 10 - periodSeconds: 5 - successThreshold: 3 startupProbe: + tcpSocket: + port: 5432 + initialDelaySeconds: 0 + periodSeconds: 10 + timeoutSeconds: 1 + failureThreshold: 30 + readinessProbe: + tcpSocket: + port: 5432 + initialDelaySeconds: 5 + periodSeconds: 5 + timeoutSeconds: 1 + successThreshold: 1 + livenessProbe: tcpSocket: port: 5432 initialDelaySeconds: 10 periodSeconds: 5 - successThreshold: 3 + timeoutSeconds: 1 + failureThreshold: 3 nodeSelector: node.k8s.hty1024.com/type: app diff --git a/examples/seafile/seafile.yaml b/examples/seafile/seafile.yaml index b470477..7b67266 100644 --- a/examples/seafile/seafile.yaml +++ b/examples/seafile/seafile.yaml @@ -276,26 +276,27 @@ spec: env: - name: MYSQL_ROOT_PASSWORD_FILE value: "/tmp/secret-volume/root.key" - livenessProbe: - tcpSocket: - port: 3306 - initialDelaySeconds: 300 - periodSeconds: 10 - timeoutSeconds: 30 - failureThreshold: 3 - successThreshold: 3 - readinessProbe: - tcpSocket: - port: 3306 - initialDelaySeconds: 10 - periodSeconds: 5 - successThreshold: 3 startupProbe: + tcpSocket: + port: 3306 + initialDelaySeconds: 0 + periodSeconds: 10 + timeoutSeconds: 1 + failureThreshold: 30 + readinessProbe: + tcpSocket: + port: 3306 + initialDelaySeconds: 5 + periodSeconds: 5 + timeoutSeconds: 1 + successThreshold: 1 + livenessProbe: tcpSocket: port: 3306 initialDelaySeconds: 10 periodSeconds: 5 - successThreshold: 3 + timeoutSeconds: 1 + failureThreshold: 3 - name: memcached image: memcached:1.6.33-alpine3.21 ports: @@ -305,26 +306,27 @@ spec: - name: localtime mountPath: /etc/localtime readOnly: true - livenessProbe: - tcpSocket: - port: 11211 - initialDelaySeconds: 300 - periodSeconds: 10 - timeoutSeconds: 30 - failureThreshold: 3 - successThreshold: 3 - readinessProbe: - tcpSocket: - port: 11211 - initialDelaySeconds: 10 - periodSeconds: 5 - successThreshold: 3 startupProbe: + tcpSocket: + port: 11211 + initialDelaySeconds: 0 + periodSeconds: 10 + timeoutSeconds: 1 + failureThreshold: 30 + readinessProbe: + tcpSocket: + port: 11211 + initialDelaySeconds: 5 + periodSeconds: 5 + timeoutSeconds: 1 + successThreshold: 1 + livenessProbe: tcpSocket: port: 11211 initialDelaySeconds: 10 periodSeconds: 5 - successThreshold: 3 + timeoutSeconds: 1 + failureThreshold: 3 - name: seafile image: seafileltd/seafile-mc:11.0.9 ports: @@ -351,26 +353,27 @@ spec: value: "false" - name: SEAFILE_SERVER_HOSTNAME value: "test.hty1024.com" - livenessProbe: - tcpSocket: - port: 80 - initialDelaySeconds: 300 - periodSeconds: 10 - timeoutSeconds: 30 - failureThreshold: 3 - successThreshold: 3 - readinessProbe: - tcpSocket: - port: 80 - initialDelaySeconds: 10 - periodSeconds: 5 - successThreshold: 3 startupProbe: + tcpSocket: + port: 80 + initialDelaySeconds: 0 + periodSeconds: 10 + timeoutSeconds: 1 + failureThreshold: 30 + readinessProbe: + tcpSocket: + port: 80 + initialDelaySeconds: 5 + periodSeconds: 5 + timeoutSeconds: 1 + successThreshold: 1 + livenessProbe: tcpSocket: port: 80 initialDelaySeconds: 10 periodSeconds: 5 - successThreshold: 3 + timeoutSeconds: 1 + failureThreshold: 3 nodeSelector: node.k8s.hty1024.com/type: app diff --git a/examples/trilium/trilium.yaml b/examples/trilium/trilium.yaml index e9224ce..83b26f1 100644 --- a/examples/trilium/trilium.yaml +++ b/examples/trilium/trilium.yaml @@ -161,26 +161,27 @@ spec: readOnly: true - name: hty1024-app-trilium-data mountPath: /home/node/trilium-data - livenessProbe: - tcpSocket: - port: 8080 - initialDelaySeconds: 300 - periodSeconds: 10 - timeoutSeconds: 30 - failureThreshold: 3 - successThreshold: 3 - readinessProbe: - tcpSocket: - port: 8080 - initialDelaySeconds: 10 - periodSeconds: 5 - successThreshold: 3 startupProbe: + tcpSocket: + port: 8080 + initialDelaySeconds: 0 + periodSeconds: 10 + timeoutSeconds: 1 + failureThreshold: 30 + readinessProbe: + tcpSocket: + port: 8080 + initialDelaySeconds: 5 + periodSeconds: 5 + timeoutSeconds: 1 + successThreshold: 1 + livenessProbe: tcpSocket: port: 8080 initialDelaySeconds: 10 periodSeconds: 5 - successThreshold: 3 + timeoutSeconds: 1 + failureThreshold: 3 nodeSelector: node.k8s.hty1024.com/type: app diff --git a/examples/vaultwarden/vaultwarden.yaml b/examples/vaultwarden/vaultwarden.yaml index ec2f60f..4815e21 100644 --- a/examples/vaultwarden/vaultwarden.yaml +++ b/examples/vaultwarden/vaultwarden.yaml @@ -161,26 +161,27 @@ spec: env: - name: SIGNUPS_ALLOWED value: "false" - livenessProbe: - tcpSocket: - port: 80 - initialDelaySeconds: 300 - periodSeconds: 10 - timeoutSeconds: 30 - failureThreshold: 3 - successThreshold: 3 - readinessProbe: - tcpSocket: - port: 80 - initialDelaySeconds: 10 - periodSeconds: 5 - successThreshold: 3 startupProbe: + tcpSocket: + port: 80 + initialDelaySeconds: 0 + periodSeconds: 10 + timeoutSeconds: 1 + failureThreshold: 30 + readinessProbe: + tcpSocket: + port: 80 + initialDelaySeconds: 5 + periodSeconds: 5 + timeoutSeconds: 1 + successThreshold: 1 + livenessProbe: tcpSocket: port: 80 initialDelaySeconds: 10 periodSeconds: 5 - successThreshold: 3 + timeoutSeconds: 1 + failureThreshold: 3 nodeSelector: node.k8s.hty1024.com/type: app diff --git a/examples/wikijs/wikijs.yaml b/examples/wikijs/wikijs.yaml index 8e12ade..12d7a76 100644 --- a/examples/wikijs/wikijs.yaml +++ b/examples/wikijs/wikijs.yaml @@ -171,26 +171,27 @@ spec: value: "123456" - name: DB_NAME value: "wikijs" - livenessProbe: - tcpSocket: - port: 3000 - initialDelaySeconds: 300 - periodSeconds: 10 - timeoutSeconds: 30 - failureThreshold: 3 - successThreshold: 3 - readinessProbe: - tcpSocket: - port: 3000 - initialDelaySeconds: 10 - periodSeconds: 5 - successThreshold: 3 startupProbe: + tcpSocket: + port: 3000 + initialDelaySeconds: 0 + periodSeconds: 10 + timeoutSeconds: 1 + failureThreshold: 30 + readinessProbe: + tcpSocket: + port: 3000 + initialDelaySeconds: 5 + periodSeconds: 5 + timeoutSeconds: 1 + successThreshold: 1 + livenessProbe: tcpSocket: port: 3000 initialDelaySeconds: 10 periodSeconds: 5 - successThreshold: 3 + timeoutSeconds: 1 + failureThreshold: 3 nodeSelector: node.k8s.hty1024.com/type: app diff --git a/examples/wiznote/wiznote.yaml b/examples/wiznote/wiznote.yaml index 02c179b..d8a91f0 100644 --- a/examples/wiznote/wiznote.yaml +++ b/examples/wiznote/wiznote.yaml @@ -158,26 +158,27 @@ spec: readOnly: true - name: hty1024-app-wiznote-data mountPath: /wiz/storage - livenessProbe: - tcpSocket: - port: 80 - initialDelaySeconds: 300 - periodSeconds: 10 - timeoutSeconds: 30 - failureThreshold: 3 - successThreshold: 3 - readinessProbe: - tcpSocket: - port: 80 - initialDelaySeconds: 10 - periodSeconds: 5 - successThreshold: 3 startupProbe: + tcpSocket: + port: 80 + initialDelaySeconds: 0 + periodSeconds: 10 + timeoutSeconds: 1 + failureThreshold: 30 + readinessProbe: + tcpSocket: + port: 80 + initialDelaySeconds: 5 + periodSeconds: 5 + timeoutSeconds: 1 + successThreshold: 1 + livenessProbe: tcpSocket: port: 80 initialDelaySeconds: 10 periodSeconds: 5 - successThreshold: 3 + timeoutSeconds: 1 + failureThreshold: 3 nodeSelector: node.k8s.hty1024.com/type: app diff --git a/examples/xbrowsersync/xbrowsersync.yaml b/examples/xbrowsersync/xbrowsersync.yaml index 3836cf4..3d9d398 100644 --- a/examples/xbrowsersync/xbrowsersync.yaml +++ b/examples/xbrowsersync/xbrowsersync.yaml @@ -309,26 +309,27 @@ spec: value: "xbrowsersync" - name: XBS_DB_PASSWORD value: "123456" - livenessProbe: - tcpSocket: - port: 27017 - initialDelaySeconds: 300 - periodSeconds: 10 - timeoutSeconds: 30 - failureThreshold: 3 - successThreshold: 3 - readinessProbe: - tcpSocket: - port: 27017 - initialDelaySeconds: 10 - periodSeconds: 5 - successThreshold: 3 startupProbe: + tcpSocket: + port: 27017 + initialDelaySeconds: 0 + periodSeconds: 10 + timeoutSeconds: 1 + failureThreshold: 30 + readinessProbe: + tcpSocket: + port: 27017 + initialDelaySeconds: 5 + periodSeconds: 5 + timeoutSeconds: 1 + successThreshold: 1 + livenessProbe: tcpSocket: port: 27017 initialDelaySeconds: 10 periodSeconds: 5 - successThreshold: 3 + timeoutSeconds: 1 + failureThreshold: 3 - name: xbrowsersync image: xbrowsersync/api:1.1.13 ports: @@ -347,26 +348,27 @@ spec: value: "xbrowsersync" - name: XBROWSERSYNC_DB_PWD value: "123456" - livenessProbe: - tcpSocket: - port: 8080 - initialDelaySeconds: 300 - periodSeconds: 10 - timeoutSeconds: 30 - failureThreshold: 3 - successThreshold: 3 - readinessProbe: - tcpSocket: - port: 8080 - initialDelaySeconds: 10 - periodSeconds: 5 - successThreshold: 3 startupProbe: + tcpSocket: + port: 8080 + initialDelaySeconds: 0 + periodSeconds: 10 + timeoutSeconds: 1 + failureThreshold: 30 + readinessProbe: + tcpSocket: + port: 8080 + initialDelaySeconds: 5 + periodSeconds: 5 + timeoutSeconds: 1 + successThreshold: 1 + livenessProbe: tcpSocket: port: 8080 initialDelaySeconds: 10 periodSeconds: 5 - successThreshold: 3 + timeoutSeconds: 1 + failureThreshold: 3 nodeSelector: node.k8s.hty1024.com/type: app