1.helm pulls the installation package
helm repo add containeroo https://charts.containeroo.ch
helm pull containeroo/local-path-provisioner --version 0.0.19
tar -zxvf local-path-provisioner-0.0.19.tgz
cd local-path-provisioner
mv values.yaml values.yaml.back
grep -v "#" values.yaml.back > values.yaml
2. The modified chart
replicaCount: 1
image:
repository: rancher/local-path-provisioner
tag: v0.0.19
pullPolicy: IfNotPresent
nodePathMap:
- node: DEFAULT_PATH_FOR_NON_LISTED_NODES
paths:
- /opt/local-path-provisioner
storageClass:
create: true
defaultClass: false
name: local-path
reclaimPolicy: Delete
Pull the image to the local image repository
docker pull rancher/local-path-provisioner:v0.0.19
docker tag rancher/local-path-provisioner:v0.0.19 registry.cn-shenzhen.aliyuncs.com/gemdale/local-path-provisioner-00:v1.1.0.0
Modified chart
tee ci/ci-values.yaml <<EOF
replicaCount: 3
image:
registry.cn-shenzhen.aliyuncs.com/gemdale/local-path-provisioner-00
tag: v1.1.0.0
imagePullSecrets:
- name: gemdale-registry.cn-shenzhen.cr.aliyuncs.com-secret
nodePathMap:
- node: DEFAULT_PATH_FOR_NON_LISTED_NODES
paths:
- /data/local-path-provisioner
storageClass:
reclaimPolicy: Retain
EOF
Deploy storage class StorageClass
helm upgrade local-path-provisioner ./local-path-provisioner/ -f ./local-path-provisioner/ci/ci-values.yaml -i -n local-path-provisioner
Storage volume PersistentVolume deployment, pvc deployment
helm repo add k8s-as-helm https://ameijer.github.io/k8s-as-helm
helm pull k8s-as-helm/pvc --version 1.0.5
tar -zxvf pvc-1.0.5.tgz
cd pvc
tee ci/ci-values.yaml <<EOF
apiVersion: v1
nameOverride: ''
accessModes:
- ReadWriteOnce
size: 25Mi
storageClassName: default
volumeBindingMode: ''
EOF
pvc-chart of mysql5.7
tee ci/yxyw/mysql/percona57-master-data-local-path-values.yaml <<EOF
nameOverride: percona57-master-data-local-path
size: 1Gi
storageClassName: local-path
EOF
Deploy pvc of mysql5.7
#### percona57-master-data-local-path
helm upgrade percona57-master-data-local-path ./pvc/ -f ./pvc/ci/ci-values.yaml -f ./pvc/ci/yxyw/mysql/percona57-master-data-local-path-values.yaml -i -n yxyw
tee ci/rabbitmq-data-local-path-values.yaml <<EOF
nameOverride: rabbitmq-data-local-path
size: 1Gi
storageClassName: local-path
EOF
Deploy rabbitmq pvc
helm upgrade rabbitmq-local-path ./pvc/ -f ./pvc/ci/ci-values.yaml -f ./pvc/ci/rabbitmq-data-local-path-values.yaml -i -n default