Helm安装Mysql8主从复制集群
目录
一、Helm安装
二、安装mysql
1、拉取镜像
2、修改配置文件
3、创建mysql-secret
4、安装
一、Helm安装
这里不再赘叙,具体安装请参考官网
Helm | 快速入门指南
二、安装mysql
1、拉取镜像
#添加仓库
helm repo add bitnami https://charts.bitnami.com/bitnami#搜索镜像
helm search repo mysql#拉取镜像
helm pull bitnami/mysql --version 12.0.0#加压文件
tar -zxf mysql-12.0.0.tgz
2、修改配置文件
# Copyright Broadcom, Inc. All Rights Reserved.
# SPDX-License-Identifier: APACHE-2.0## @section Global parameters
## Global Docker image parameters
## Please, note that this will override the image parameters, including dependencies, configured to use the global value
## Current available global Docker image parameters: imageRegistry, imagePullSecrets and storageClass
#### @param global.imageRegistry Global Docker image registry
## @param global.imagePullSecrets Global Docker registry secret names as an array
## @param global.defaultStorageClass Global default StorageClass for Persistent Volume(s)
## @param global.storageClass DEPRECATED: use global.defaultStorageClass instead
##
global:imageRegistry: ""## E.g.## imagePullSecrets:## - myRegistryKeySecretName##imagePullSecrets: []defaultStorageClass: "manager-nfs-storage" #修改这里为自己的scstorageClass: ""## Compatibility adaptations for Kubernetes platforms##compatibility:## Compatibility adaptations for Openshift##openshift:## @param global.compatibility.openshift.adaptSecurityContext Adapt the securityContext sections of the deployment to make them compatible with Openshift restricted-v2 SCC: remove runAsUser, runAsGroup and fsGroup and let the platform use their allowed default IDs. Possible values: auto (apply if the detected running cluster is Openshift), force (perform the adaptation always), disabled (do not perform adaptation)##adaptSecurityContext: auto
## @section Common parameters
#### @param kubeVersion Force target Kubernetes version (using Helm capabilities if not set)
##
kubeVersion: ""
## @param nameOverride String to partially override common.names.fullname template (will maintain the release name)
##
nameOverride: ""
## @param fullnameOverride String to fully override common.names.fullname template
##
fullnameOverride: ""
## @param namespaceOverride String to fully override common.names.namespace
##
namespaceOverride: ""
## @param clusterDomain Cluster domain
##
clusterDomain: cluster.local
## @param commonAnnotations Common annotations to add to all MySQL resources (sub-charts are not considered). Evaluated as a template
##
commonAnnotations: {}
## @param commonLabels Common labels to add to all MySQL resources (sub-charts are not considered). Evaluated as a template
##
commonLabels: {}
## @param extraDeploy Array with extra yaml to deploy with the chart. Evaluated as a template
##
extraDeploy: []
## @param serviceBindings.enabled Create secret for service binding (Experimental)
## Ref: https://servicebinding.io/service-provider/
##
serviceBindings:enabled: false
## Enable diagnostic mode in the deployment
##
diagnosticMode:## @param diagnosticMode.enabled Enable diagnostic mode (all probes will be disabled and the command will be overridden)##enabled: false## @param diagnosticMode.command Command to override all containers in the deployment##command:- sleep## @param diagnosticMode.args Args to override all containers in the deployment##args:- infinity
## @section MySQL common parameters
#### Bitnami MySQL image
## ref: https://hub.docker.com/r/bitnami/mysql/tags/
## @param image.registry [default: REGISTRY_NAME] MySQL image registry
## @param image.repository [default: REPOSITORY_NAME/mysql] MySQL image repository
## @skip image.tag MySQL image tag (immutable tags are recommended)
## @param image.digest MySQL image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag
## @param image.pullPolicy MySQL image pull policy
## @param image.pullSecrets Specify docker-registry secret names as an array
## @param image.debug Specify if debug logs should be enabled
##
image:registry: docker.iorepository: bitnami/mysqltag: 8.4.3-debian-12-r0digest: ""## Specify a imagePullPolicy## ref: https://kubernetes.io/docs/concepts/containers/images/#pre-pulled-images##pullPolicy: IfNotPresent## Optionally specify an array of imagePullSecrets (secrets must be manually created in the namespace)## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/## Example:## pullSecrets:## - myRegistryKeySecretName##pullSecrets: []## Set to true if you would like to see extra information on logs## It turns BASH and/or NAMI debugging in the image##debug: false
## @param architecture MySQL architecture (`standalone` or `replication`)
##
architecture: replication #这里指定replication
## MySQL Authentication parameters
##
auth:## @param auth.rootPassword Password for the `root` user. Ignored if existing secret is provided## ref: https://github.com/bitnami/containers/tree/main/bitnami/mysql#setting-the-root-password-on-first-run##rootPassword: ""## @param auth.createDatabase Whether to create the .Values.auth.database or not## ref: https://github.com/bitnami/containers/tree/main/bitnami/mysql#creating-a-database-on-first-run##createDatabase: true## @param auth.database Name for a custom database to create## ref: https://github.com/bitnami/containers/tree/main/bitnami/mysql#creating-a-database-on-first-run##database: "my_database"## @param auth.username Name for a custom user to create## ref: https://github.com/bitnami/containers/tree/main/bitnami/mysql#creating-a-database-user-on-first-run##username: ""## @param auth.password Password for the new user. Ignored if existing secret is provided##password: ""## @param auth.replicationUser MySQL replication user## ref: https://github.com/bitnami/containers/tree/main/bitnami/mysql#setting-up-a-replication-cluster##replicationUser: replicator## @param auth.replicationPassword MySQL replication user password. Ignored if existing secret is provided##replicationPassword: ""## @param auth.existingSecret Use existing secret for password details. The secret has to contain the keys `mysql-root-password`, `mysql-replication-password` and `mysql-password`## NOTE: When it's set the auth.rootPassword, auth.password, auth.replicationPassword are ignored.##existingSecret: "mysql-secret" #这里修改为自己创建的secret,如果不修改这里,就指定上面的rootPassword属性## @param auth.usePasswordFiles Mount credentials as files instead of using an environment variable##usePasswordFiles: false## @param auth.customPasswordFiles Use custom password files when `auth.usePasswordFiles` is set to `true`. Define path for keys `root` and `user`, also define `replicator` if `architecture` is set to `replication`## Example:## customPasswordFiles:## root: /vault/secrets/mysql-root## user: /vault/secrets/mysql-user## replicator: /vault/secrets/mysql-replicator##customPasswordFiles: {}## @param auth.authenticationPolicy Sets the authentication policy, by default it will use `* ,,`## ref: https://dev.mysql.com/doc/refman/8.4/en/server-system-variables.html#sysvar_authentication_policy##authenticationPolicy: ""
## @param initdbScripts Dictionary of initdb scripts
## Specify dictionary of scripts to be run at first boot
## Example:
## initdbScripts:
## my_init_script.sh: |
## #!/bin/bash
## echo "Do something."
##
initdbScripts: {}
## @param initdbScriptsConfigMap ConfigMap with the initdb scripts (Note: Overrides `initdbScripts`)
##
initdbScriptsConfigMap: ""
## @param startdbScripts Dictionary of startdb scripts
## Specify dictionary of scripts to be run every time the container is started
## Example:
## startdbScripts:
## my_start_script.sh: |
## #!/bin/bash
## echo "Do something."
##
startdbScripts: {}
## @param startdbScriptsConfigMap ConfigMap with the startdb scripts (Note: Overrides `startdbScripts`)
##
startdbScriptsConfigMap: ""
## @section MySQL Primary parameters
##
primary:## @param primary.name Name of the primary database (eg primary, master, leader, ...)##name: master## @param primary.command Override default container command on MySQL Primary container(s) (useful when using custom images)##command: []## @param primary.args Override default container args on MySQL Primary container(s) (useful when using custom images)##args: []## @param primary.lifecycleHooks for the MySQL Primary container(s) to automate configuration before or after startup##lifecycleHooks: {}## @param primary.automountServiceAccountToken Mount Service Account token in pod##automountServiceAccountToken: false## @param primary.hostAliases Deployment pod host aliases## https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/##hostAliases: []## @param primary.enableMySQLX Enable mysqlx port## ref: https://dev.mysql.com/doc/dev/mysql-server/latest/mysqlx_protocol_xplugin.html##enableMySQLX: false## @param primary.configuration [string] Configure MySQL Primary with a custom my.cnf file## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file##configuration: |-[mysqld]authentication_policy='{{- .Values.auth.authenticationPolicy | default "* ,," }}'skip-name-resolveexplicit_defaults_for_timestampbasedir=/opt/bitnami/mysqlplugin_dir=/opt/bitnami/mysql/lib/pluginport={{ .Values.primary.containerPorts.mysql }}mysqlx={{ ternary 1 0 .Values.primary.enableMySQLX }}mysqlx_port={{ .Values.primary.containerPorts.mysqlx }}socket=/opt/bitnami/mysql/tmp/mysql.sockdatadir=/bitnami/mysql/datatmpdir=/opt/bitnami/mysql/tmpmax_allowed_packet=16Mbind-address=*pid-file=/opt/bitnami/mysql/tmp/mysqld.pidlog-error=/opt/bitnami/mysql/logs/mysqld.logcharacter-set-server=UTF8slow_query_log=0long_query_time=10.0[client]port={{ .Values.primary.containerPorts.mysql }}socket=/opt/bitnami/mysql/tmp/mysql.sockdefault-character-set=UTF8plugin_dir=/opt/bitnami/mysql/lib/plugin[manager]port={{ .Values.primary.containerPorts.mysql }}socket=/opt/bitnami/mysql/tmp/mysql.sockpid-file=/opt/bitnami/mysql/tmp/mysqld.pid## @param primary.existingConfigmap Name of existing ConfigMap with MySQL Primary configuration.## NOTE: When it's set the 'configuration' parameter is ignored##existingConfigmap: ""## @param primary.containerPorts.mysql Container port for mysql## @param primary.containerPorts.mysqlx Container port for mysqlx##containerPorts:mysql: 3306mysqlx: 33060## @param primary.updateStrategy.type Update strategy type for the MySQL primary statefulset## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies##updateStrategy:type: RollingUpdate## @param primary.podAnnotations Additional pod annotations for MySQL primary pods## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/##podAnnotations: {}## @param primary.podAffinityPreset MySQL primary pod affinity preset. Ignored if `primary.affinity` is set. Allowed values: `soft` or `hard`## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity##podAffinityPreset: ""## @param primary.podAntiAffinityPreset MySQL primary pod anti-affinity preset. Ignored if `primary.affinity` is set. Allowed values: `soft` or `hard`## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity##podAntiAffinityPreset: soft## MySQL Primary node affinity preset## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity##nodeAffinityPreset:## @param primary.nodeAffinityPreset.type MySQL primary node affinity preset type. Ignored if `primary.affinity` is set. Allowed values: `soft` or `hard`##type: ""## @param primary.nodeAffinityPreset.key MySQL primary node label key to match Ignored if `primary.affinity` is set.## E.g.## key: "kubernetes.io/e2e-az-name"##key: ""## @param primary.nodeAffinityPreset.values MySQL primary node label values to match. Ignored if `primary.affinity` is set.## E.g.## values:## - e2e-az1## - e2e-az2##values: []## @param primary.affinity Affinity for MySQL primary pods assignment## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity## Note: podAffinityPreset, podAntiAffinityPreset, and nodeAffinityPreset will be ignored when it's set##affinity: {}## @param primary.nodeSelector Node labels for MySQL primary pods assignment## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/##nodeSelector: {}## @param primary.tolerations Tolerations for MySQL primary pods assignment## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/##tolerations: []## @param primary.priorityClassName MySQL primary pods' priorityClassName##priorityClassName: ""## @param primary.runtimeClassName MySQL primary pods' runtimeClassName##runtimeClassName: ""## @param primary.schedulerName Name of the k8s scheduler (other than default)## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/##schedulerName: ""## @param primary.terminationGracePeriodSeconds In seconds, time the given to the MySQL primary pod needs to terminate gracefully## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods##terminationGracePeriodSeconds: ""## @param primary.topologySpreadConstraints Topology Spread Constraints for pod assignment## https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/## The value is evaluated as a template##topologySpreadConstraints: []## @param primary.podManagementPolicy podManagementPolicy to manage scaling operation of MySQL primary pods## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#pod-management-policies##podManagementPolicy: ""## MySQL primary Pod security context## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod## @param primary.podSecurityContext.enabled Enable security context for MySQL primary pods## @param primary.podSecurityContext.fsGroupChangePolicy Set filesystem group change policy## @param primary.podSecurityContext.sysctls Set kernel settings using the sysctl interface## @param primary.podSecurityContext.supplementalGroups Set filesystem extra groups## @param primary.podSecurityContext.fsGroup Group ID for the mounted volumes' filesystem##podSecurityContext:enabled: truefsGroupChangePolicy: Alwayssysctls: []supplementalGroups: []fsGroup: 1001## MySQL primary container security context## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container## @param primary.containerSecurityContext.enabled MySQL primary container securityContext## @param primary.containerSecurityContext.seLinuxOptions [object,nullable] Set SELinux options in container## @param primary.containerSecurityContext.runAsUser User ID for the MySQL primary container## @param primary.containerSecurityContext.runAsGroup Group ID for the MySQL primary container## @param primary.containerSecurityContext.runAsNonRoot Set MySQL primary container's Security Context runAsNonRoot## @param primary.containerSecurityContext.allowPrivilegeEscalation Set container's privilege escalation## @param primary.containerSecurityContext.capabilities.drop Set container's Security Context runAsNonRoot## @param primary.containerSecurityContext.seccompProfile.type Set Client container's Security Context seccomp profile## @param primary.containerSecurityContext.readOnlyRootFilesystem Set container's Security Context read-only root filesystem##containerSecurityContext:enabled: trueseLinuxOptions: {}runAsUser: 1001runAsGroup: 1001runAsNonRoot: trueallowPrivilegeEscalation: falsecapabilities:drop: ["ALL"]seccompProfile:type: "RuntimeDefault"readOnlyRootFilesystem: true## MySQL primary container's resource requests and limits## ref: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/## We usually recommend not to specify default resources and to leave this as a conscious## choice for the user. This also increases chances charts run on environments with little## resources, such as Minikube. If you do want to specify resources, uncomment the following## lines, adjust them as necessary, and remove the curly braces after 'resources:'.## @param primary.resourcesPreset Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if primary.resources is set (primary.resources is recommended for production).## More information: https://github.com/bitnami/charts/blob/main/bitnami/common/templates/_resources.tpl#L15##resourcesPreset: "small"## @param primary.resources Set container requests and limits for different resources like CPU or memory (essential for production workloads)## Example:## resources:## requests:## cpu: 2## memory: 512Mi## limits:## cpu: 3## memory: 1024Mi##resources: {}## Configure extra options for liveness probe## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes## @param primary.livenessProbe.enabled Enable livenessProbe## @param primary.livenessProbe.initialDelaySeconds Initial delay seconds for livenessProbe## @param primary.livenessProbe.periodSeconds Period seconds for livenessProbe## @param primary.livenessProbe.timeoutSeconds Timeout seconds for livenessProbe## @param primary.livenessProbe.failureThreshold Failure threshold for livenessProbe## @param primary.livenessProbe.successThreshold Success threshold for livenessProbe##livenessProbe:enabled: trueinitialDelaySeconds: 5periodSeconds: 10timeoutSeconds: 1failureThreshold: 3successThreshold: 1## Configure extra options for readiness probe## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes## @param primary.readinessProbe.enabled Enable readinessProbe## @param primary.readinessProbe.initialDelaySeconds Initial delay seconds for readinessProbe## @param primary.readinessProbe.periodSeconds Period seconds for readinessProbe## @param primary.readinessProbe.timeoutSeconds Timeout seconds for readinessProbe## @param primary.readinessProbe.failureThreshold Failure threshold for readinessProbe## @param primary.readinessProbe.successThreshold Success threshold for readinessProbe##readinessProbe:enabled: trueinitialDelaySeconds: 5periodSeconds: 10timeoutSeconds: 1failureThreshold: 3successThreshold: 1## Configure extra options for startupProbe probe## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes## @param primary.startupProbe.enabled Enable startupProbe## @param primary.startupProbe.initialDelaySeconds Initial delay seconds for startupProbe## @param primary.startupProbe.periodSeconds Period seconds for startupProbe## @param primary.startupProbe.timeoutSeconds Timeout seconds for startupProbe## @param primary.startupProbe.failureThreshold Failure threshold for startupProbe## @param primary.startupProbe.successThreshold Success threshold for startupProbe##startupProbe:enabled: trueinitialDelaySeconds: 15periodSeconds: 10timeoutSeconds: 1failureThreshold: 10successThreshold: 1## @param primary.customLivenessProbe Override default liveness probe for MySQL primary containers##customLivenessProbe: {}## @param primary.customReadinessProbe Override default readiness probe for MySQL primary containers##customReadinessProbe: {}## @param primary.customStartupProbe Override default startup probe for MySQL primary containers##customStartupProbe: {}## @param primary.extraFlags MySQL primary additional command line flags## Can be used to specify command line flags, for example:## E.g.## extraFlags: "--max-connect-errors=1000 --max_connections=155"##extraFlags: ""## @param primary.extraEnvVars Extra environment variables to be set on MySQL primary containers## E.g.## extraEnvVars:## - name: TZ## value: "Europe/Paris"##extraEnvVars: []## @param primary.extraEnvVarsCM Name of existing ConfigMap containing extra env vars for MySQL primary containers##extraEnvVarsCM: ""## @param primary.extraEnvVarsSecret Name of existing Secret containing extra env vars for MySQL primary containers##extraEnvVarsSecret: ""## @param primary.extraPodSpec Optionally specify extra PodSpec for the MySQL Primary pod(s)##extraPodSpec: {}## @param primary.extraPorts Extra ports to expose##extraPorts: []## Enable persistence using Persistent Volume Claims## ref: https://kubernetes.io/docs/concepts/storage/persistent-volumes/##persistence:## @param primary.persistence.enabled Enable persistence on MySQL primary replicas using a `PersistentVolumeClaim`. If false, use emptyDir##enabled: true## @param primary.persistence.existingClaim Name of an existing `PersistentVolumeClaim` for MySQL primary replicas## NOTE: When it's set the rest of persistence parameters are ignored##existingClaim: ""## @param primary.persistence.subPath The name of a volume's sub path to mount for persistence##subPath: ""## @param primary.persistence.storageClass MySQL primary persistent volume storage Class## If defined, storageClassName: <storageClass>## If set to "-", storageClassName: "", which disables dynamic provisioning## If undefined (the default) or set to null, no storageClassName spec is## set, choosing the default provisioner. (gp2 on AWS, standard on## GKE, AWS & OpenStack)##storageClass: "manager-nfs-storage" #这里修改自己的sc## @param primary.persistence.annotations MySQL primary persistent volume claim annotations##annotations: {}## @param primary.persistence.accessModes MySQL primary persistent volume access Modes##accessModes:- ReadWriteOnce## @param primary.persistence.size MySQL primary persistent volume size##size: 1Gi #根据实际情况调整大小## @param primary.persistence.selector Selector to match an existing Persistent Volume## selector:## matchLabels:## app: my-app##selector: {}## Primary Persistent Volume Claim Retention Policy## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#persistentvolumeclaim-retention##persistentVolumeClaimRetentionPolicy:## @param primary.persistentVolumeClaimRetentionPolicy.enabled Enable Persistent volume retention policy for Primary StatefulSet##enabled: false## @param primary.persistentVolumeClaimRetentionPolicy.whenScaled Volume retention behavior when the replica count of the StatefulSet is reduced##whenScaled: Retain## @param primary.persistentVolumeClaimRetentionPolicy.whenDeleted Volume retention behavior that applies when the StatefulSet is deleted##whenDeleted: Retain## @param primary.extraVolumes Optionally specify extra list of additional volumes to the MySQL Primary pod(s)##extraVolumes: []## @param primary.extraVolumeMounts Optionally specify extra list of additional volumeMounts for the MySQL Primary container(s)##extraVolumeMounts: []## @param primary.initContainers Add additional init containers for the MySQL Primary pod(s)##initContainers: []## @param primary.sidecars Add additional sidecar containers for the MySQL Primary pod(s)##sidecars: []## MySQL Primary Service parameters##service:## @param primary.service.type MySQL Primary K8s service type##type: NodePort #修改为nodeport,方便外部访问## @param primary.service.ports.mysql MySQL Primary K8s service port## @param primary.service.ports.mysqlx MySQL Primary K8s service mysqlx port##ports:mysql: 3306mysqlx: 33060## @param primary.service.nodePorts.mysql MySQL Primary K8s service node port## @param primary.service.nodePorts.mysqlx MySQL Primary K8s service node port mysqlx## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport##nodePorts:mysql: ""mysqlx: ""## @param primary.service.clusterIP MySQL Primary K8s service clusterIP IP## e.g:## clusterIP: None##clusterIP: ""## @param primary.service.loadBalancerIP MySQL Primary loadBalancerIP if service type is `LoadBalancer`## Set the LoadBalancer service type to internal only## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer##loadBalancerIP: ""## @param primary.service.externalTrafficPolicy Enable client source IP preservation## ref https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip##externalTrafficPolicy: Cluster## @param primary.service.loadBalancerSourceRanges Addresses that are allowed when MySQL Primary service is LoadBalancer## https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service## E.g.## loadBalancerSourceRanges:## - 10.10.10.0/24##loadBalancerSourceRanges: []## @param primary.service.extraPorts Extra ports to expose (normally used with the `sidecar` value)##extraPorts: []## @param primary.service.annotations Additional custom annotations for MySQL primary service##annotations: {}## @param primary.service.sessionAffinity Session Affinity for Kubernetes service, can be "None" or "ClientIP"## If "ClientIP", consecutive client requests will be directed to the same Pod## ref: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies##sessionAffinity: None## @param primary.service.sessionAffinityConfig Additional settings for the sessionAffinity## sessionAffinityConfig:## clientIP:## timeoutSeconds: 300##sessionAffinityConfig: {}## Headless service properties##headless:## @param primary.service.headless.annotations Additional custom annotations for headless MySQL primary service.##annotations: {}## MySQL primary Pod Disruption Budget configuration## ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb/##pdb:## @param primary.pdb.create Enable/disable a Pod Disruption Budget creation for MySQL primary pods##create: true## @param primary.pdb.minAvailable Minimum number/percentage of MySQL primary pods that should remain scheduled##minAvailable: ""## @param primary.pdb.maxUnavailable Maximum number/percentage of MySQL primary pods that may be made unavailable. Defaults to `1` if both `primary.pdb.minAvailable` and `primary.pdb.maxUnavailable` are empty.##maxUnavailable: ""## @param primary.podLabels MySQL Primary pod label. If labels are same as commonLabels , this will take precedence##podLabels: {}
## @section MySQL Secondary parameters
##
secondary:## @param secondary.name Name of the secondary database (eg secondary, slave, ...)##name: slave #指定name## @param secondary.replicaCount Number of MySQL secondary replicas##replicaCount: 1 #副本数量## @param secondary.automountServiceAccountToken Mount Service Account token in pod##automountServiceAccountToken: false## @param secondary.hostAliases Deployment pod host aliases## https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/##hostAliases: []## @param secondary.command Override default container command on MySQL Secondary container(s) (useful when using custom images)##command: []## @param secondary.args Override default container args on MySQL Secondary container(s) (useful when using custom images)##args: []## @param secondary.lifecycleHooks for the MySQL Secondary container(s) to automate configuration before or after startup##lifecycleHooks: {}## @param secondary.enableMySQLX Enable mysqlx port## ref: https://dev.mysql.com/doc/dev/mysql-server/latest/mysqlx_protocol_xplugin.html##enableMySQLX: false## @param secondary.configuration [string] Configure MySQL Secondary with a custom my.cnf file## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file##configuration: |-[mysqld]authentication_policy='{{- .Values.auth.authenticationPolicy | default "* ,," }}'skip-name-resolveexplicit_defaults_for_timestampbasedir=/opt/bitnami/mysqlplugin_dir=/opt/bitnami/mysql/lib/pluginport={{ .Values.secondary.containerPorts.mysql }}mysqlx={{ ternary 1 0 .Values.secondary.enableMySQLX }}mysqlx_port={{ .Values.secondary.containerPorts.mysqlx }}socket=/opt/bitnami/mysql/tmp/mysql.sockdatadir=/bitnami/mysql/datatmpdir=/opt/bitnami/mysql/tmpmax_allowed_packet=16Mbind-address=*pid-file=/opt/bitnami/mysql/tmp/mysqld.pidlog-error=/opt/bitnami/mysql/logs/mysqld.logcharacter-set-server=UTF8slow_query_log=0long_query_time=10.0[client]port={{ .Values.secondary.containerPorts.mysql }}socket=/opt/bitnami/mysql/tmp/mysql.sockdefault-character-set=UTF8plugin_dir=/opt/bitnami/mysql/lib/plugin[manager]port={{ .Values.secondary.containerPorts.mysql }}socket=/opt/bitnami/mysql/tmp/mysql.sockpid-file=/opt/bitnami/mysql/tmp/mysqld.pid## @param secondary.existingConfigmap Name of existing ConfigMap with MySQL Secondary configuration.## NOTE: When it's set the 'configuration' parameter is ignored##existingConfigmap: ""## @param secondary.containerPorts.mysql Container port for mysql## @param secondary.containerPorts.mysqlx Container port for mysqlx##containerPorts:mysql: 3306mysqlx: 33060## @param secondary.updateStrategy.type Update strategy type for the MySQL secondary statefulset## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies##updateStrategy:type: RollingUpdate## @param secondary.podAnnotations Additional pod annotations for MySQL secondary pods## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/##podAnnotations: {}## @param secondary.podAffinityPreset MySQL secondary pod affinity preset. Ignored if `secondary.affinity` is set. Allowed values: `soft` or `hard`## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity##podAffinityPreset: ""## @param secondary.podAntiAffinityPreset MySQL secondary pod anti-affinity preset. Ignored if `secondary.affinity` is set. Allowed values: `soft` or `hard`## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity## Allowed values: soft, hard##podAntiAffinityPreset: soft## MySQL Secondary node affinity preset## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity##nodeAffinityPreset:## @param secondary.nodeAffinityPreset.type MySQL secondary node affinity preset type. Ignored if `secondary.affinity` is set. Allowed values: `soft` or `hard`##type: ""## @param secondary.nodeAffinityPreset.key MySQL secondary node label key to match Ignored if `secondary.affinity` is set.## E.g.## key: "kubernetes.io/e2e-az-name"##key: ""## @param secondary.nodeAffinityPreset.values MySQL secondary node label values to match. Ignored if `secondary.affinity` is set.## E.g.## values:## - e2e-az1## - e2e-az2##values: []## @param secondary.affinity Affinity for MySQL secondary pods assignment## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity## Note: podAffinityPreset, podAntiAffinityPreset, and nodeAffinityPreset will be ignored when it's set##affinity: {}## @param secondary.nodeSelector Node labels for MySQL secondary pods assignment## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/##nodeSelector: {}## @param secondary.tolerations Tolerations for MySQL secondary pods assignment## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/##tolerations: []## @param secondary.priorityClassName MySQL secondary pods' priorityClassName##priorityClassName: ""## @param secondary.runtimeClassName MySQL secondary pods' runtimeClassName##runtimeClassName: ""## @param secondary.schedulerName Name of the k8s scheduler (other than default)## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/##schedulerName: ""## @param secondary.terminationGracePeriodSeconds In seconds, time the given to the MySQL secondary pod needs to terminate gracefully## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods##terminationGracePeriodSeconds: ""## @param secondary.topologySpreadConstraints Topology Spread Constraints for pod assignment## https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/## The value is evaluated as a template##topologySpreadConstraints: []## @param secondary.podManagementPolicy podManagementPolicy to manage scaling operation of MySQL secondary pods## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#pod-management-policies##podManagementPolicy: ""## MySQL secondary Pod security context## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod## @param secondary.podSecurityContext.enabled Enable security context for MySQL secondary pods## @param secondary.podSecurityContext.fsGroupChangePolicy Set filesystem group change policy## @param secondary.podSecurityContext.sysctls Set kernel settings using the sysctl interface## @param secondary.podSecurityContext.supplementalGroups Set filesystem extra groups## @param secondary.podSecurityContext.fsGroup Group ID for the mounted volumes' filesystem##podSecurityContext:enabled: truefsGroupChangePolicy: Alwayssysctls: []supplementalGroups: []fsGroup: 1001## MySQL secondary container security context## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container## @param secondary.containerSecurityContext.enabled MySQL secondary container securityContext## @param secondary.containerSecurityContext.seLinuxOptions [object,nullable] Set SELinux options in container## @param secondary.containerSecurityContext.runAsUser User ID for the MySQL secondary container## @param secondary.containerSecurityContext.runAsGroup Group ID for the MySQL secondary container## @param secondary.containerSecurityContext.runAsNonRoot Set MySQL secondary container's Security Context runAsNonRoot## @param secondary.containerSecurityContext.allowPrivilegeEscalation Set container's privilege escalation## @param secondary.containerSecurityContext.capabilities.drop Set container's Security Context runAsNonRoot## @param secondary.containerSecurityContext.seccompProfile.type Set container's Security Context seccomp profile## @param secondary.containerSecurityContext.readOnlyRootFilesystem Set container's Security Context read-only root filesystem##containerSecurityContext:enabled: trueseLinuxOptions: {}runAsUser: 1001runAsGroup: 1001runAsNonRoot: trueallowPrivilegeEscalation: falsecapabilities:drop: ["ALL"]seccompProfile:type: "RuntimeDefault"readOnlyRootFilesystem: true## MySQL secondary container's resource requests and limits## ref: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/## We usually recommend not to specify default resources and to leave this as a conscious## choice for the user. This also increases chances charts run on environments with little## resources, such as Minikube. If you do want to specify resources, uncomment the following## lines, adjust them as necessary, and remove the curly braces after 'resources:'.## @param secondary.resourcesPreset Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if secondary.resources is set (secondary.resources is recommended for production).## More information: https://github.com/bitnami/charts/blob/main/bitnami/common/templates/_resources.tpl#L15##resourcesPreset: "small"## @param secondary.resources Set container requests and limits for different resources like CPU or memory (essential for production workloads)## Example:## resources:## requests:## cpu: 2## memory: 512Mi## limits:## cpu: 3## memory: 1024Mi##resources: {}## Configure extra options for liveness probe## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes## @param secondary.livenessProbe.enabled Enable livenessProbe## @param secondary.livenessProbe.initialDelaySeconds Initial delay seconds for livenessProbe## @param secondary.livenessProbe.periodSeconds Period seconds for livenessProbe## @param secondary.livenessProbe.timeoutSeconds Timeout seconds for livenessProbe## @param secondary.livenessProbe.failureThreshold Failure threshold for livenessProbe## @param secondary.livenessProbe.successThreshold Success threshold for livenessProbe##livenessProbe:enabled: trueinitialDelaySeconds: 5periodSeconds: 10timeoutSeconds: 1failureThreshold: 3successThreshold: 1## Configure extra options for readiness probe## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes## @param secondary.readinessProbe.enabled Enable readinessProbe## @param secondary.readinessProbe.initialDelaySeconds Initial delay seconds for readinessProbe## @param secondary.readinessProbe.periodSeconds Period seconds for readinessProbe## @param secondary.readinessProbe.timeoutSeconds Timeout seconds for readinessProbe## @param secondary.readinessProbe.failureThreshold Failure threshold for readinessProbe## @param secondary.readinessProbe.successThreshold Success threshold for readinessProbe##readinessProbe:enabled: trueinitialDelaySeconds: 5periodSeconds: 10timeoutSeconds: 1failureThreshold: 3successThreshold: 1## Configure extra options for startupProbe probe## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes## @param secondary.startupProbe.enabled Enable startupProbe## @param secondary.startupProbe.initialDelaySeconds Initial delay seconds for startupProbe## @param secondary.startupProbe.periodSeconds Period seconds for startupProbe## @param secondary.startupProbe.timeoutSeconds Timeout seconds for startupProbe## @param secondary.startupProbe.failureThreshold Failure threshold for startupProbe## @param secondary.startupProbe.successThreshold Success threshold for startupProbe##startupProbe:enabled: trueinitialDelaySeconds: 15periodSeconds: 10timeoutSeconds: 1failureThreshold: 15successThreshold: 1## @param secondary.customLivenessProbe Override default liveness probe for MySQL secondary containers##customLivenessProbe: {}## @param secondary.customReadinessProbe Override default readiness probe for MySQL secondary containers##customReadinessProbe: {}## @param secondary.customStartupProbe Override default startup probe for MySQL secondary containers##customStartupProbe: {}## @param secondary.extraFlags MySQL secondary additional command line flags## Can be used to specify command line flags, for example:## E.g.## extraFlags: "--max-connect-errors=1000 --max_connections=155"##extraFlags: ""## @param secondary.extraEnvVars An array to add extra environment variables on MySQL secondary containers## E.g.## extraEnvVars:## - name: TZ## value: "Europe/Paris"##extraEnvVars: []## @param secondary.extraEnvVarsCM Name of existing ConfigMap containing extra env vars for MySQL secondary containers##extraEnvVarsCM: ""## @param secondary.extraEnvVarsSecret Name of existing Secret containing extra env vars for MySQL secondary containers##extraEnvVarsSecret: ""## @param secondary.extraPodSpec Optionally specify extra PodSpec for the MySQL Secondary pod(s)##extraPodSpec: {}## @param secondary.extraPorts Extra ports to expose##extraPorts: []## Enable persistence using Persistent Volume Claims## ref: https://kubernetes.io/docs/concepts/storage/persistent-volumes/##persistence:## @param secondary.persistence.enabled Enable persistence on MySQL secondary replicas using a `PersistentVolumeClaim`##enabled: true## @param secondary.persistence.existingClaim Name of an existing `PersistentVolumeClaim` for MySQL secondary replicas## NOTE: When it's set the rest of persistence parameters are ignored##existingClaim: ""## @param secondary.persistence.subPath The name of a volume's sub path to mount for persistence##subPath: ""## @param secondary.persistence.storageClass MySQL secondary persistent volume storage Class## If defined, storageClassName: <storageClass>## If set to "-", storageClassName: "", which disables dynamic provisioning## If undefined (the default) or set to null, no storageClassName spec is## set, choosing the default provisioner. (gp2 on AWS, standard on## GKE, AWS & OpenStack)##storageClass: "manager-nfs-storage" #修改为自己的sc## @param secondary.persistence.annotations MySQL secondary persistent volume claim annotations##annotations: {}## @param secondary.persistence.accessModes MySQL secondary persistent volume access Modes##accessModes:- ReadWriteOnce## @param secondary.persistence.size MySQL secondary persistent volume size##size: 1Gi #根据实际情况修改,我这里做测试,写的比较小## @param secondary.persistence.selector Selector to match an existing Persistent Volume## selector:## matchLabels:## app: my-app##selector: {}## Secondary Persistent Volume Claim Retention Policy## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#persistentvolumeclaim-retention##persistentVolumeClaimRetentionPolicy:## @param secondary.persistentVolumeClaimRetentionPolicy.enabled Enable Persistent volume retention policy for read only StatefulSet##enabled: false## @param secondary.persistentVolumeClaimRetentionPolicy.whenScaled Volume retention behavior when the replica count of the StatefulSet is reduced##whenScaled: Retain## @param secondary.persistentVolumeClaimRetentionPolicy.whenDeleted Volume retention behavior that applies when the StatefulSet is deleted##whenDeleted: Retain## @param secondary.extraVolumes Optionally specify extra list of additional volumes to the MySQL secondary pod(s)##extraVolumes: []## @param secondary.extraVolumeMounts Optionally specify extra list of additional volumeMounts for the MySQL secondary container(s)##extraVolumeMounts: []## @param secondary.initContainers Add additional init containers for the MySQL secondary pod(s)##initContainers: []## @param secondary.sidecars Add additional sidecar containers for the MySQL secondary pod(s)##sidecars: []## MySQL Secondary Service parameters##service:## @param secondary.service.type MySQL secondary Kubernetes service type##type: NodePort## @param secondary.service.ports.mysql MySQL secondary Kubernetes service port## @param secondary.service.ports.mysqlx MySQL secondary Kubernetes service port mysqlx##ports:mysql: 3306mysqlx: 33060## @param secondary.service.nodePorts.mysql MySQL secondary Kubernetes service node port## @param secondary.service.nodePorts.mysqlx MySQL secondary Kubernetes service node port mysqlx## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport##nodePorts:mysql: ""mysqlx: ""## @param secondary.service.clusterIP MySQL secondary Kubernetes service clusterIP IP## e.g:## clusterIP: None##clusterIP: ""## @param secondary.service.loadBalancerIP MySQL secondary loadBalancerIP if service type is `LoadBalancer`## Set the LoadBalancer service type to internal only## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer##loadBalancerIP: ""## @param secondary.service.externalTrafficPolicy Enable client source IP preservation## ref https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip##externalTrafficPolicy: Cluster## @param secondary.service.loadBalancerSourceRanges Addresses that are allowed when MySQL secondary service is LoadBalancer## https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service## E.g.## loadBalancerSourceRanges:## - 10.10.10.0/24##loadBalancerSourceRanges: []## @param secondary.service.extraPorts Extra ports to expose (normally used with the `sidecar` value)##extraPorts: []## @param secondary.service.annotations Additional custom annotations for MySQL secondary service##annotations: {}## @param secondary.service.sessionAffinity Session Affinity for Kubernetes service, can be "None" or "ClientIP"## If "ClientIP", consecutive client requests will be directed to the same Pod## ref: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies##sessionAffinity: None## @param secondary.service.sessionAffinityConfig Additional settings for the sessionAffinity## sessionAffinityConfig:## clientIP:## timeoutSeconds: 300##sessionAffinityConfig: {}## Headless service properties##headless:## @param secondary.service.headless.annotations Additional custom annotations for headless MySQL secondary service.##annotations: {}## MySQL secondary Pod Disruption Budget configuration## ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb/##pdb:## @param secondary.pdb.create Enable/disable a Pod Disruption Budget creation for MySQL secondary pods##create: true## @param secondary.pdb.minAvailable Minimum number/percentage of MySQL secondary pods that should remain scheduled##minAvailable: ""## @param secondary.pdb.maxUnavailable Maximum number/percentage of MySQL secondary pods that may be made unavailable. Defaults to `1` if both `secondary.pdb.minAvailable` and `secondary.pdb.maxUnavailable` are empty.##maxUnavailable: ""## @param secondary.podLabels Additional pod labels for MySQL secondary pods##podLabels: {}
## @section RBAC parameters
#### MySQL pods ServiceAccount
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
##
serviceAccount:## @param serviceAccount.create Enable the creation of a ServiceAccount for MySQL pods##create: true## @param serviceAccount.name Name of the created ServiceAccount## If not set and create is true, a name is generated using the mysql.fullname template##name: ""## @param serviceAccount.annotations Annotations for MySQL Service Account##annotations: {}## @param serviceAccount.automountServiceAccountToken Automount service account token for the server service account##automountServiceAccountToken: false
## Role Based Access
## ref: https://kubernetes.io/docs/admin/authorization/rbac/
##
rbac:## @param rbac.create Whether to create & use RBAC resources or not##create: false## @param rbac.rules Custom RBAC rules to set## e.g:## rules:## - apiGroups:## - ""## resources:## - pods## verbs:## - get## - list##rules: []
## @section Network Policy
#### Network Policy configuration
## ref: https://kubernetes.io/docs/concepts/services-networking/network-policies/
##
networkPolicy:## @param networkPolicy.enabled Enable creation of NetworkPolicy resources##enabled: true## @param networkPolicy.allowExternal The Policy model to apply## When set to false, only pods with the correct client label will have network access to the ports MySQL is## listening on. When true, MySQL will accept connections from any source (with the correct destination port).##allowExternal: true## @param networkPolicy.allowExternalEgress Allow the pod to access any range of port and all destinations.##allowExternalEgress: true## @param networkPolicy.extraIngress [array] Add extra ingress rules to the NetworkPolicy## e.g:## extraIngress:## - ports:## - port: 1234## from:## - podSelector:## - matchLabels:## - role: frontend## - podSelector:## - matchExpressions:## - key: role## operator: In## values:## - frontend##extraIngress: []## @param networkPolicy.extraEgress [array] Add extra ingress rules to the NetworkPolicy## e.g:## extraEgress:## - ports:## - port: 1234## to:## - podSelector:## - matchLabels:## - role: frontend## - podSelector:## - matchExpressions:## - key: role## operator: In## values:## - frontend##extraEgress: []## @param networkPolicy.ingressNSMatchLabels [object] Labels to match to allow traffic from other namespaces## @param networkPolicy.ingressNSPodMatchLabels [object] Pod labels to match to allow traffic from other namespaces##ingressNSMatchLabels: {}ingressNSPodMatchLabels: {}## @section Password update job
##
passwordUpdateJob:## @param passwordUpdateJob.enabled Enable password update job##enabled: false## @param passwordUpdateJob.backoffLimit set backoff limit of the job##backoffLimit: 10## @param passwordUpdateJob.command Override default container command on mysql Primary container(s) (useful when using custom images)##command: []## @param passwordUpdateJob.args Override default container args on mysql Primary container(s) (useful when using custom images)##args: []## @param passwordUpdateJob.extraCommands Extra commands to pass to the generation job##extraCommands: ""## @param passwordUpdateJob.previousPasswords.rootPassword Previous root password (set if the password secret was already changed)## @param passwordUpdateJob.previousPasswords.password Previous password (set if the password secret was already changed)## @param passwordUpdateJob.previousPasswords.replicationPassword Previous replication password (set if the password secret was already changed)## @param passwordUpdateJob.previousPasswords.existingSecret Name of a secret containing the previous passwords (set if the password secret was already changed)previousPasswords:rootPassword: ""password: ""replicationPassword: ""existingSecret: ""## Configure Container Security Context## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container## @param passwordUpdateJob.containerSecurityContext.enabled Enabled containers' Security Context## @param passwordUpdateJob.containerSecurityContext.seLinuxOptions [object,nullable] Set SELinux options in container## @param passwordUpdateJob.containerSecurityContext.runAsUser Set containers' Security Context runAsUser## @param passwordUpdateJob.containerSecurityContext.runAsGroup Set containers' Security Context runAsGroup## @param passwordUpdateJob.containerSecurityContext.runAsNonRoot Set container's Security Context runAsNonRoot## @param passwordUpdateJob.containerSecurityContext.privileged Set container's Security Context privileged## @param passwordUpdateJob.containerSecurityContext.readOnlyRootFilesystem Set container's Security Context readOnlyRootFilesystem## @param passwordUpdateJob.containerSecurityContext.allowPrivilegeEscalation Set container's Security Context allowPrivilegeEscalation## @param passwordUpdateJob.containerSecurityContext.capabilities.drop List of capabilities to be dropped## @param passwordUpdateJob.containerSecurityContext.seccompProfile.type Set container's Security Context seccomp profile##containerSecurityContext:enabled: trueseLinuxOptions: {}runAsUser: 1001runAsGroup: 1001runAsNonRoot: trueprivileged: falsereadOnlyRootFilesystem: trueallowPrivilegeEscalation: falsecapabilities:drop: ["ALL"]seccompProfile:type: "RuntimeDefault"## Configure Pods Security Context## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod## @param passwordUpdateJob.podSecurityContext.enabled Enabled credential init job pods' Security Context## @param passwordUpdateJob.podSecurityContext.fsGroupChangePolicy Set filesystem group change policy## @param passwordUpdateJob.podSecurityContext.sysctls Set kernel settings using the sysctl interface## @param passwordUpdateJob.podSecurityContext.supplementalGroups Set filesystem extra groups## @param passwordUpdateJob.podSecurityContext.fsGroup Set credential init job pod's Security Context fsGroup##podSecurityContext:enabled: truefsGroupChangePolicy: Alwayssysctls: []supplementalGroups: []fsGroup: 1001## @param passwordUpdateJob.extraEnvVars Array containing extra env vars to configure the credential init job## For example:## extraEnvVars:## - name: GF_DEFAULT_INSTANCE_NAME## value: my-instance##extraEnvVars: []## @param passwordUpdateJob.extraEnvVarsCM ConfigMap containing extra env vars to configure the credential init job##extraEnvVarsCM: ""## @param passwordUpdateJob.extraEnvVarsSecret Secret containing extra env vars to configure the credential init job (in case of sensitive data)##extraEnvVarsSecret: ""## @param passwordUpdateJob.extraVolumes Optionally specify extra list of additional volumes for the credential init job##extraVolumes: []## @param passwordUpdateJob.extraVolumeMounts Array of extra volume mounts to be added to the jwt Container (evaluated as template). Normally used with `extraVolumes`.##extraVolumeMounts: []## @param passwordUpdateJob.initContainers Add additional init containers for the mysql Primary pod(s)##initContainers: []## Container resource requests and limits## ref: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/## @param passwordUpdateJob.resourcesPreset Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if passwordUpdateJob.resources is set (passwordUpdateJob.resources is recommended for production).## More information: https://github.com/bitnami/charts/blob/main/bitnami/common/templates/_resources.tpl#L15##resourcesPreset: "micro"## @param passwordUpdateJob.resources Set container requests and limits for different resources like CPU or memory (essential for production workloads)## Example:## resources:## requests:## cpu: 2## memory: 512Mi## limits:## cpu: 3## memory: 1024Mi##resources: {}## @param passwordUpdateJob.customLivenessProbe Custom livenessProbe that overrides the default one##customLivenessProbe: {}## @param passwordUpdateJob.customReadinessProbe Custom readinessProbe that overrides the default one##customReadinessProbe: {}## @param passwordUpdateJob.customStartupProbe Custom startupProbe that overrides the default one##customStartupProbe: {}## @param passwordUpdateJob.automountServiceAccountToken Mount Service Account token in pod##automountServiceAccountToken: false## @param passwordUpdateJob.hostAliases Add deployment host aliases## https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/##hostAliases: []## @param passwordUpdateJob.annotations [object] Add annotations to the job##annotations: {}## @param passwordUpdateJob.podLabels Additional pod labels## Ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/##podLabels: {}## @param passwordUpdateJob.podAnnotations Additional pod annotations## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/##podAnnotations: {}## @section Volume Permissions parameters
#### Init containers parameters:
## volumePermissions: Change the owner and group of the persistent volume mountpoint to runAsUser:fsGroup values from the securityContext section.
##
volumePermissions:## @param volumePermissions.enabled Enable init container that changes the owner and group of the persistent volume(s) mountpoint to `runAsUser:fsGroup`##enabled: false## @param volumePermissions.image.registry [default: REGISTRY_NAME] Init container volume-permissions image registry## @param volumePermissions.image.repository [default: REPOSITORY_NAME/os-shell] Init container volume-permissions image repository## @skip volumePermissions.image.tag Init container volume-permissions image tag (immutable tags are recommended)## @param volumePermissions.image.digest Init container volume-permissions image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag## @param volumePermissions.image.pullPolicy Init container volume-permissions image pull policy## @param volumePermissions.image.pullSecrets Specify docker-registry secret names as an array##image:registry: docker.iorepository: bitnami/os-shelltag: 12-debian-12-r31digest: ""pullPolicy: IfNotPresent## Optionally specify an array of imagePullSecrets.## Secrets must be manually created in the namespace.## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/## e.g:## pullSecrets:## - myRegistryKeySecretName##pullSecrets: []## @param volumePermissions.resourcesPreset Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if volumePermissions.resources is set (volumePermissions.resources is recommended for production).## More information: https://github.com/bitnami/charts/blob/main/bitnami/common/templates/_resources.tpl#L15##resourcesPreset: "nano"## @param volumePermissions.resources Set container requests and limits for different resources like CPU or memory (essential for production workloads)## Example:## resources:## requests:## cpu: 2## memory: 512Mi## limits:## cpu: 3## memory: 1024Mi##resources: {}
## @section Metrics parameters
#### Mysqld Prometheus exporter parameters
##
metrics:## @param metrics.enabled Start a side-car prometheus exporter##enabled: false## @param metrics.image.registry [default: REGISTRY_NAME] Exporter image registry## @param metrics.image.repository [default: REPOSITORY_NAME/mysqld-exporter] Exporter image repository## @skip metrics.image.tag Exporter image tag (immutable tags are recommended)## @param metrics.image.digest Exporter image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag## @param metrics.image.pullPolicy Exporter image pull policy## @param metrics.image.pullSecrets Specify docker-registry secret names as an array##image:registry: docker.iorepository: bitnami/mysqld-exportertag: 0.15.1-debian-12-r35digest: ""pullPolicy: IfNotPresent## Optionally specify an array of imagePullSecrets.## Secrets must be manually created in the namespace.## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/## e.g:## pullSecrets:## - myRegistryKeySecretName##pullSecrets: []## MySQL metrics container security context## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container## @param metrics.containerSecurityContext.enabled MySQL metrics container securityContext## @param metrics.containerSecurityContext.seLinuxOptions [object,nullable] Set SELinux options in container## @param metrics.containerSecurityContext.runAsUser User ID for the MySQL metrics container## @param metrics.containerSecurityContext.runAsGroup Group ID for the MySQL metrics container## @param metrics.containerSecurityContext.runAsNonRoot Set MySQL metrics container's Security Context runAsNonRoot## @param metrics.containerSecurityContext.allowPrivilegeEscalation Set container's privilege escalation## @param metrics.containerSecurityContext.capabilities.drop Set container's Security Context runAsNonRoot## @param metrics.containerSecurityContext.seccompProfile.type Set container's Security Context seccomp profile## @param metrics.containerSecurityContext.readOnlyRootFilesystem Set container's Security Context read-only root filesystem##containerSecurityContext:enabled: trueseLinuxOptions: {}runAsUser: 1001runAsGroup: 1001runAsNonRoot: trueallowPrivilegeEscalation: falsecapabilities:drop: ["ALL"]seccompProfile:type: "RuntimeDefault"readOnlyRootFilesystem: true## @param metrics.containerPorts.http Container port for http##containerPorts:http: 9104## MySQL Prometheus exporter service parameters## Mysqld Prometheus exporter liveness and readiness probes## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes## @param metrics.service.type Kubernetes service type for MySQL Prometheus Exporter## @param metrics.service.clusterIP Kubernetes service clusterIP for MySQL Prometheus Exporter## @param metrics.service.port MySQL Prometheus Exporter service port## @param metrics.service.annotations [object] Prometheus exporter service annotations##service:type: ClusterIPport: 9104clusterIP: ""annotations:prometheus.io/scrape: "true"prometheus.io/port: "{{ .Values.metrics.service.port }}"## @param metrics.extraArgs.primary Extra args to be passed to mysqld_exporter on Primary pods## @param metrics.extraArgs.secondary Extra args to be passed to mysqld_exporter on Secondary pods## ref: https://github.com/prometheus/mysqld_exporter/## E.g.## - --collect.auto_increment.columns## - --collect.binlog_size## - --collect.engine_innodb_status## - --collect.engine_tokudb_status## - --collect.global_status## - --collect.global_variables## - --collect.info_schema.clientstats## - --collect.info_schema.innodb_metrics## - --collect.info_schema.innodb_tablespaces## - --collect.info_schema.innodb_cmp## - --collect.info_schema.innodb_cmpmem## - --collect.info_schema.processlist## - --collect.info_schema.processlist.min_time## - --collect.info_schema.query_response_time## - --collect.info_schema.tables## - --collect.info_schema.tables.databases## - --collect.info_schema.tablestats## - --collect.info_schema.userstats## - --collect.perf_schema.eventsstatements## - --collect.perf_schema.eventsstatements.digest_text_limit## - --collect.perf_schema.eventsstatements.limit## - --collect.perf_schema.eventsstatements.timelimit## - --collect.perf_schema.eventswaits## - --collect.perf_schema.file_events## - --collect.perf_schema.file_instances## - --collect.perf_schema.indexiowaits## - --collect.perf_schema.tableiowaits## - --collect.perf_schema.tablelocks## - --collect.perf_schema.replication_group_member_stats## - --collect.slave_status## - --collect.slave_hosts## - --collect.heartbeat## - --collect.heartbeat.database## - --collect.heartbeat.table##extraArgs:primary: []secondary: []## Mysqld Prometheus exporter resource requests and limits## ref: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/## We usually recommend not to specify default resources and to leave this as a conscious## choice for the user. This also increases chances charts run on environments with little## resources, such as Minikube. If you do want to specify resources, uncomment the following## lines, adjust them as necessary, and remove the curly braces after 'resources:'.## @param metrics.resourcesPreset Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if metrics.resources is set (metrics.resources is recommended for production).## More information: https://github.com/bitnami/charts/blob/main/bitnami/common/templates/_resources.tpl#L15##resourcesPreset: "nano"## @param metrics.resources Set container requests and limits for different resources like CPU or memory (essential for production workloads)## Example:## resources:## requests:## cpu: 2## memory: 512Mi## limits:## cpu: 3## memory: 1024Mi##resources: {}## Mysqld Prometheus exporter liveness probe## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes## @param metrics.livenessProbe.enabled Enable livenessProbe## @param metrics.livenessProbe.initialDelaySeconds Initial delay seconds for livenessProbe## @param metrics.livenessProbe.periodSeconds Period seconds for livenessProbe## @param metrics.livenessProbe.timeoutSeconds Timeout seconds for livenessProbe## @param metrics.livenessProbe.failureThreshold Failure threshold for livenessProbe## @param metrics.livenessProbe.successThreshold Success threshold for livenessProbe##livenessProbe:enabled: trueinitialDelaySeconds: 120periodSeconds: 10timeoutSeconds: 1successThreshold: 1failureThreshold: 3## Mysqld Prometheus exporter readiness probe## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes## @param metrics.readinessProbe.enabled Enable readinessProbe## @param metrics.readinessProbe.initialDelaySeconds Initial delay seconds for readinessProbe## @param metrics.readinessProbe.periodSeconds Period seconds for readinessProbe## @param metrics.readinessProbe.timeoutSeconds Timeout seconds for readinessProbe## @param metrics.readinessProbe.failureThreshold Failure threshold for readinessProbe## @param metrics.readinessProbe.successThreshold Success threshold for readinessProbe##readinessProbe:enabled: trueinitialDelaySeconds: 30periodSeconds: 10timeoutSeconds: 1successThreshold: 1failureThreshold: 3## Prometheus Service Monitor## ref: https://github.com/coreos/prometheus-operator##serviceMonitor:## @param metrics.serviceMonitor.enabled Create ServiceMonitor Resource for scraping metrics using PrometheusOperator##enabled: false## @param metrics.serviceMonitor.namespace Specify the namespace in which the serviceMonitor resource will be created##namespace: ""## @param metrics.serviceMonitor.jobLabel The name of the label on the target service to use as the job name in prometheus.##jobLabel: ""## @param metrics.serviceMonitor.interval Specify the interval at which metrics should be scraped##interval: 30s## @param metrics.serviceMonitor.scrapeTimeout Specify the timeout after which the scrape is ended## e.g:## scrapeTimeout: 30s##scrapeTimeout: ""## @param metrics.serviceMonitor.relabelings RelabelConfigs to apply to samples before scraping## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#relabelconfig##relabelings: []## @param metrics.serviceMonitor.metricRelabelings MetricRelabelConfigs to apply to samples before ingestion## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#relabelconfig##metricRelabelings: []## @param metrics.serviceMonitor.selector ServiceMonitor selector labels## ref: https://github.com/bitnami/charts/tree/main/bitnami/prometheus-operator#prometheus-configuration#### selector:## prometheus: my-prometheus##selector: {}## @param metrics.serviceMonitor.honorLabels Specify honorLabels parameter to add the scrape endpoint##honorLabels: false## @param metrics.serviceMonitor.labels Used to pass Labels that are used by the Prometheus installed in your cluster to select Service Monitors to work with## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#prometheusspec##labels: {}## @param metrics.serviceMonitor.annotations ServiceMonitor annotations##annotations: {}## Prometheus Operator prometheusRule configuration##prometheusRule:## @param metrics.prometheusRule.enabled Creates a Prometheus Operator prometheusRule (also requires `metrics.enabled` to be `true` and `metrics.prometheusRule.rules`)##enabled: false #这里普罗修斯监控,我没开启## @param metrics.prometheusRule.namespace Namespace for the prometheusRule Resource (defaults to the Release Namespace)##namespace: ""## @param metrics.prometheusRule.additionalLabels Additional labels that can be used so prometheusRule will be discovered by Prometheus##additionalLabels: {}## @param metrics.prometheusRule.rules Prometheus Rule definitions## - alert: Mysql-Down## expr: absent(up{job="mysql"} == 1)## for: 5m## labels:## severity: warning## service: mysql## annotations:## message: 'mysql instance {{`{{`}} $labels.instance {{`}}`}} is down'## summary: mysql instance is down##rules: []
3、创建mysql-secret
apiVersion: v1
kind: Secret
metadata:name: mysql-secretnamespace: mysql8labels:app: mysql
type: Opaque
data:password: MTIzNDU2 # echo -n "123456"mysql-root-password: MTIzNDU2mysql-replication-password: MTIzNDU2
4、安装
#创建ns
kubectl create ns mysql8
#创建secretkubectl create -f mysql-secret.yaml#安装mysql8helm install mysql ./mysql -n mysql8 #查看资源kubectl get all -n mysql8
相关文章:
Helm安装Mysql8主从复制集群
目录 一、Helm安装 二、安装mysql 1、拉取镜像 2、修改配置文件 3、创建mysql-secret 4、安装 一、Helm安装 这里不再赘叙,具体安装请参考官网 Helm | 快速入门指南 二、安装mysql 1、拉取镜像 #添加仓库 helm repo add bitnami https://charts.bitnami.c…...
[小白系列]GPU-nvidia-smi指令
nvidia-smi(NVIDIA System Management Interface)是一种命令行实用程序,用于监控和管理NVIDIA GPU(图形处理器)的状态和性能。它提供了一种简单而强大的方式来获取有关GPU的实时信息,并且可以用于诊断、…...
Flutter 图片编辑板(一) 事件路由
一个图片编辑板,有两部分组成。编辑板和内容项。每一个内容项是被InteractiveViewer修饰的widget,具有缩放偏移的功能。 在图片编辑板上, 会有多个内容相,图片或文字(添加文字目前还没做过)。 当要编辑其中…...
Cherno C++学习笔记 P33 字符串的字面量
在这篇文章当中我们介绍一下有关于字符串更加深入的知识,也就是字符串的字面量。 首先什么是字面量?其实也很简单,就是双引号里面的那一坨,其实就是字面量,我们举一个最简单的例子: #include<iostream…...
数据结构 (36)各种排序方法的综合比较
一、常见排序方法分类 插入排序类 直接插入排序:通过构建有序序列,对于未排序数据,在已排序序列中从后向前扫描,找到相应位置并插入。希尔排序:是插入排序的一种改进版本,先将整个待排序的记录序列分割成为…...
Master EDI 项目需求分析
Master Electronics 通过其全球分销网络,支持多种采购需求,确保能够为客户提供可靠的元件供应链解决方案,同时为快速高效的与全球伙伴建立合作,Master 选择通过EDI来实现与交易伙伴间的数据传输。 EDI为交易伙伴之间建立了一个安…...
java+ssm+mysql计算机等级考试网
项目介绍: 使用javassmmysql开发的计算机等级考试信息网,系统包含前后台,包含超级管理员,系统管理员角色,功能如下: 前台:首页;考试动态;相关资源下载;考试…...
MitelMiCollab 身份绕过导致任意文件读取漏洞复现(CVE-2024-41713)
0x01 产品描述: Mitel MiCollab 是一个企业协作平台,它将各种通信工具整合到一个应用程序中,提供语音和视频通话、消息传递、状态信息、音频会议、移动支持和团队协作功能。0x02 漏洞描述: Mitel MiCollab 的 NuPoint 统一消息 (NPM) 组件中存在身份验证绕过漏洞,由于输入…...
【Python]深入Python日志管理:从logging到分布式日志追踪的完整指南
《Python OpenCV从菜鸟到高手》带你进入图像处理与计算机视觉的大门! 日志是软件开发中的核心部分,尤其在分布式系统中,日志对于调试和问题定位至关重要。本篇文章将从Python标准库的logging模块出发,逐步探讨日志管理的最佳实践,涵盖日志配置、日志分层、日志格式化等基…...
python rstrip 的迷惑行为
在项目中,我需要把字符串末尾的一部分去掉,类似截断,我用ide的随笔提示,发现了rstrip这个方法,然后我试了下,满足我的需求,但在测试过程中,我发现了rstrip的一些行为很让我迷惑。 开…...
SPI通信协议
SPI通信协议 简介通信原理通信原理SPI数据通信的流程可以分为以下几步:通信特性设备时钟时钟速率时钟极性跟相位SPI协议层通讯流程详解优点:缺点: DS1302 时钟实验控制寄存器日历、时钟寄存器寄存器说明 DS1302 读写时序软件功能实现 简介 SP…...
vue中如何实现商品多规格添加(后台商城管理系统)
在制作商城类的后台管理系统中会遇到多规格商品的添加,需要向固定的数组内添加,通过查看数据结构正确的向数组中添加数据。 如图: 功能需求:1.每次点击添加新规格时,批量设置会多出来一行表格和一个标题输入框。 最…...
智创 AI 新视界 -- AIGC 重塑广告行业的创新力量(16 - 7)
💖💖💖亲爱的朋友们,热烈欢迎你们来到 青云交的博客!能与你们在此邂逅,我满心欢喜,深感无比荣幸。在这个瞬息万变的时代,我们每个人都在苦苦追寻一处能让心灵安然栖息的港湾。而 我的…...
Runloop
假设你的项目中有关tableView,然后还有一个定时器timer在执行,定时器代码如下: var num 0override func viewDidLoad() {super.viewDidLoad()let timer Timer(timeInterval: 1,target: self,selector: #selector(self.run),userInfo: nil,r…...
代码随想录第40天
121. 买卖股票的最佳时机 class Solution:def maxProfit(self, prices: List[int]) -> int:cost, profit float(inf), 0for price in prices:cost min(cost, price)profit max(profit, price - cost)return profit122.买卖股票的最佳时机II class Solution:def maxPr…...
element plus table组件多选获取数据id
首先给table加上 selection-change"handleSelectionChange"事件 示例 <el-table selection-change"handleSelectionChange" stripe:data"data?.slice((currentPage3 - 1) * pageSize3, currentPage3 * pageSize3)" style"width: 100%…...
自动驾驶:百年演进
亲爱的小伙伴们😘,在求知的漫漫旅途中,若你对深度学习的奥秘、JAVA 、PYTHON与SAP 的奇妙世界,亦或是读研论文的撰写攻略有所探寻🧐,那不妨给我一个小小的关注吧🥰。我会精心筹备,在…...
STM32 了解OLED
内容扩展 调试方式串口调试:通过串口调试,将调试信息发送到电脑端,电脑使用串口助手显示调试信息 显示屏调试:直接将显示屏连接到单片机,将调试信息打印到显示屏上 keil调试模式:借助Keil软件的调试模式&a…...
NanoLog起步笔记-7-log解压过程初探
nonolog起步笔记-6-log解压过程初探 再看解压过程建立调试工程修改makefile添加新的launch项 注:重新学习nanolog的README.mdPost-Execution Log Decompressor 下面我们尝试了解,解压的过程,是如何得到文件头部的meta信息的。 再看解压过程 …...
python连接redis详细步骤
1.下载并安装windows python Window 平台安装 Python: 以下为在 Window 平台上安装 Python 的简单步骤。 打开 WEB 浏览器访问 Python Releases for Windows | Python.org : 记得勾选 Add Python 3.6 to PATH。 在cmd 执行pip install redis 2.编辑python代码…...
使用redis 的stream 做消息中间件 多线程消费消息
1.redis stream 特点 1.支持消息持久化 2.消费者组模式 3.消息确认机制 4. 消息重试机制 5. 死信队列2. 消息生产者服务 2.1 如下代码Service Slf4j public class StreamMessageProducer {Autowiredprivate StringRedisTemplate redisTemplate;private static final String S…...
《操作系统 - 清华大学》6 -5:局部页面置换算法:最不常用置换算法 (LFU, Least Frequently Used)
文章目录 1. 最不常用算法的工作原理2.最不常用算法特征3. 示例 1. 最不常用算法的工作原理 最不常用算法:注意并不是表示算法本身不常用,而是采取最不常使用页面的策略,Least Frequently Used, LFU。LRU 是最久未被访问的页&…...
GWAS分析先做后学
大家好,我是邓飞。 GWAS分析是生物信息和统计学的交叉学科,上可以学习编程,下可以学习统计。对于Linux系统,R语言,作图,统计学,机器学习等方向,都是一个极好的入门项目。生物信息如…...
【threejs】创建FPS相机
原理说明 控制器是一个很麻烦的东西,需要创建更多的类来管理相机行为,并且可自定义性差,所以将部分控制器的功能绑定到相机上,可以解决这些问题,所以我以 FlyControls为例,将控制器功能绑定到相机上&#…...
路径规划之启发式算法之十一:布谷鸟搜索算法(Cuckoo Search,CS)
布谷鸟搜索算法(Cuckoo Search,CS)是一种新兴的自然启发式算法,由剑桥大学的杨新社教授和S.戴布(Xin-She Yang和Suash Deb)于2009年提出。该算法基于布谷鸟的寄生性育雏(巢寄生)行为…...
Mitel MiCollab企业协作平台存在任意文件读取漏洞(CVE-2024-41713)
免责声明: 本文旨在提供有关特定漏洞的深入信息,帮助用户充分了解潜在的安全风险。发布此信息的目的在于提升网络安全意识和推动技术进步,未经授权访问系统、网络或应用程序,可能会导致法律责任或严重后果。因此,作者不对读者基于本文内容所采取的任何行为承担责任。读者在…...
java+springboot+mysql党务(党员)管理系统
项目介绍: 使用javaspringbootmysql开发的党务管理系统,系统包含管理员、用户角色,功能如下: 管理员:用户管理;党支部管理;党员管理(入党申请、积极分子、发展对象、预备党员、正式…...
gozero项目迁移与新服务器环境配置,包含服务器安装包括go版本,Nginx,项目配置包括Mysql,redis,rabbit,域名
迁移 **GoZero** 项目到新服务器并配置相关环境涉及多个步骤。以下是一个系统化的指南,涵盖服务器环境安装、数据库和缓存配置、项目部署以及域名绑定。 ### 步骤概述 1. **服务器环境配置** - 安装 Go 语言环境 - 安装 Nginx - 安装 MySQL 和 Redis -…...
使用WebDAV来上传和下载文件
WebDAV是什么 基于Web的分布式编写和版本控制(WebDAV)是超文本传输协议(HTTP)的扩展,有利于用户间协同编辑和管理存储在万维网服务器文档。WebDAV 由互联网工程任务组的工作组在 RFC 4918 中定义。许多现代操作系统为 …...
集成运算放大电路反馈判断
集成运算放大电路 一种具有很高放大倍数的多级直接耦合放大电路,因最初用于信号运算而得名,简称集成运放或运放 模拟集成电路中的典型组件,是发展最快、品种最多、应用最广的一种 反馈 将放大电路输出信号的一部分或全部通过某种电路引回到输…...
什么是绩效文化?
绩效文化是一种组织文化,它将绩效视为核心价值观,贯穿于组织的各个层面和活动之中。 一、绩效文化的内涵 目标导向 绩效文化强调组织成员都朝着共同的目标努力。这个目标通常是明确、可衡量的,如企业的年度利润目标、市场份额增长目标等。例…...
【力扣】409.最长回文串
问题描述 思路解析 因为同时包含大小写字母,直接创建个ASCII表大小的桶来标记又因为是要回文子串,所以偶数个数的一定可以那么同时,对于出现奇数次数的,我没需要他们的次数-1,变为偶数,并且可以标记出现过…...
android studio创建虚拟机注意事项
emulator 启动模拟器的时候,可以用 AVD 界面,也可以用命令行启动,但命令行启 动的时候要注意,系统有两个 emulator.exe ,建议使用 emulator 目录下的那个!! 创建类型为google APIs的虚拟机可从…...
DP协议:缩略词
缩写代表的含义ACT分配更改触发(Allocation Change Trigger)API应用程序编程接口(Application Programming Interface)AUX辅助(Auxiliary)BER比特错误率(Bit Error Rate)bpc每色比特…...
【Rive】事件回调
1 前言 Android 中可以通过 RiveAnimationView 的 addEventListener 方法添加动画监听器,用于监听状态动画和过渡动画的开始和结束时机,实现动画开始和结束时的事件回调;也可以监听 Rive 事件触发的时机,在事件触发时响应回调。 …...
YOLOv8-ultralytics-8.2.103部分代码阅读笔记-tuner.py
tuner.py ultralytics\engine\tuner.py 目录 tuner.py 1.所需的库和模块 2.class Tuner: 1.所需的库和模块 # Ultralytics YOLO 🚀, AGPL-3.0 license# 模块提供用于对象检测、实例分割、图像分类、姿势估计和多对象跟踪的 Ultralytics YOLO 模型的超参数调整…...
【数据结构】堆的概念、结构、模拟实现以及应用
本篇我们来介绍一下数据结构中的堆。 1.堆的概念及结构 1)堆是一颗完全二叉树。 2)堆又分为大堆和小堆,大堆就是树里面任何一个父节点都大于子节点,所以根节点是最大值;小堆就是树里面任何一个父节点都小于子节点&am…...
推送(push)项目到gitlab
文章目录 1、git init1.1、在当前目录中显示隐藏文件:1.2、查看已有的远程仓库1.3、确保你的本地机器已经生成了 SSH 密钥:1.4、将生成的公钥文件(通常位于 ~/.ssh/id_rsa.pub)复制到 GitLab 的 SSH 设置中:1.5、测试 …...
springboot/ssm宠物商城网站系统Java代码web项目宠物用品购物论坛源码
springboot/ssm宠物商城网站系统Java代码web项目宠物用品购物论坛源码 基于springboot(可改ssm)htmlvue项目 开发语言:Java 框架:springboot/可改ssm vue JDK版本:JDK1.8(或11) 服务器:tomcat 数据库&…...
前端基础的讲解-JS(22)
什么是JSON? 1.json 是一种轻量级的数据交换格式 简单来说:json 就是一种在各个编程语言中流通的数据格式,负责不同编程语言中的数据传递和交互。 类似于: 国际通用语言 - 英语 中国 56 个民族不同地区的通用语言 - 普通话 …...
zerotier实现内网穿透(访问内网服务器)
moo 内网穿透工具 实用工具:zerotier 目录 内网穿透工具 Windows下zerotier安装 ubuntu系统下的zerotier安装 使用moon加速 Windows下zerotier安装 有了网络之后,会给你一个网络id,这个网络id是非常重要的,其它设备要加入…...
python语言中怎么调用不同级文件夹中数据文件
python语言中怎么调用文件夹中数据文件 python 怎么调用同一级文件夹中数据1. **读取同一级文件夹中的数据文件(如 .txt, .csv, .json 等)**示例: 2. **导入同一级文件夹中的 Python 模块**3. **使用相对路径导入模块**4. **使用 os.path 或 …...
spring事务源码解析
1 引入 在企业级应用开发中,事务管理 是确保数据一致性和完整性的重要手段。而在 Spring 框架中,事务管理提供了高度抽象和灵活的实现,开发者只需通过简单的注解或配置即可轻松实现复杂的事务逻辑。然而,Spring 事务背后的实现机…...
【每日刷题】Day165
【每日刷题】Day165 🥕个人主页:开敲🍉 🔥所属专栏:每日刷题🍍 🌼文章目录🌼 1. LCR 092. 将字符串翻转到单调递增 - 力扣(LeetCode) 2. 424. 替换后的最长…...
基于51单片机的智能公交车报站系统GPS定位语音播报智能安全检测人数统计
功能描述 1.LCD12864可显示当前年月日,星期,时间, 当前站名,经纬度,是否连接GPS,自动/手动模式, 2.自带GPS定位,可实时显示经纬度; 3.通过DS1302时钟芯片,获…...
计算机网络安全 —— 实体鉴别与生成大随机数
一、实体鉴别# 实体鉴别(经常简称为鉴别)就是一方验证另一方身份的技术。一个实体可以是人、客户/服务器进程等。这里仅讨论如何鉴别通信对端 实体的身份,即验证正在通信的对方确实是所认为的通信实体,而不是其他的假冒者。进…...
Vue3+Pinia 状态管理持久化
一、Pinia 简介 🎖️Pinia 起始于 2019 年 11 月左右的一次实验,其目的是设计一个拥有组合式 API 的 Vue 状态管理库。Vue3VitePinia 新三剑客逐渐替代了Vue2WebpackVuex 了,性能啥的各方面吊打。 1.1 什么是状态管理? …...
开源项目:轻型图像分割 unet_lite
DataBall 助力快速掌握数据集的信息和使用方式,会员享有 百种数据集,持续增加中。 需要更多数据资源和技术解决方案,知识星球: “DataBall - X 数据球(free)” -------------------------------------------------------------…...
C# 向上取整多种实现方法
1.使用 Math.Ceiling 方法: 在 C# 中,可以利用 System.Math 类下的 Math.Ceiling 方法来实现向上取整。它接受一个 double 或 decimal 类型的参数,并返回大于或等于该参数的最小整数(以 double 或 decimal 类型表示)。…...
Linux 权限及管理
目录 一、Linux权限 1、概念 2、超级用户和普通用户的相关操作 a. 添加用户,删除用户 b. 超级用户和普通用户的切换 c. sduo提权以及白名单设置 二、Linux权限管理 1、文件访问者的分类 2、文件访问类型和权限 a. 文件类型 b. 基本权限 3、文件权限值…...