Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update helm deploy nacos v1.2.1 #120

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions helm/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
**Note:** This file is automatically generated. Please see the [developer
documentation](doc/development/changelog.md) for instructions on adding your own
entry.

## 0.1.0 (2020-02-31)

### Other (1 change)

- Update helm deploy nacos


## 0.1.1 (2020-04-26)

### Other (1 change)

- Update nacos mysql

13 changes: 9 additions & 4 deletions helm/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
apiVersion: v1
appVersion: "1.0"
description: A Helm chart for Kubernetes
name: nacos
version: 0.1.0
description: use helm to deloy nacos cluster.
home: https://nacos.io/en-us/
icon: https://nacos.io/img/nacos.png
maintainers:
- name: arrowfeng
- email: [email protected]
name: arrowfeng
name: nacos
sources:
- https://github.com/nacos-group/nacos-k8s
version: 0.1.1
31 changes: 28 additions & 3 deletions helm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,44 @@ This project is based on the Helm Chart packaged by [nacos-k8s](https://github.c
## Prerequisites

- Kubernetes 1.10+
- Helm v3
- Helm v2+
- PV provisioner support in the underlying infrastructure

## Installing the Chart

To install nfs-client-provisioner,Must have NFS server first:

```shell
$ helm repo add stable https://kubernetes-charts.storage.googleapis.com
$ helm repo update
$ helm install --namespace kube-system \
--set nfs.server=192.168.1.2 --set nfs.path=/k8s-data --set storageClass.reclaimPolicy=Retain \
--set storageClass.defaultClass=true,storageClass.name=nfs \
--name nfs-client-provisioner stable/nfs-client-provisioner --version=1.2.8
```



To install the chart with `release name`:

```shell
$ helm install `release name` ./nacos
$ helm repo update
$ helm dependency update
$ helm install --namespace `name` --set global.mode=cluster --name `release name` ./nacos
```

The command deploys Nacos on the Kubernetes cluster in the default configuration. It will run without a mysql chart and persistent volume. The [configuration](#configuration) section lists the parameters that can be configured during installation.

Update nacos to the latest version

```shell
$ helm upgrade `release name` \
--set mysql.image=nacos/nacos-mysq,mysql.imageTag=latest \
--set image.repository=nacos/nacos-server,image.tag=latest \
--set plugins.repository=nacos/nacos-peer-finder-plugin,plugins.tag=latest \
./nacos
```

### Service & Configuration Management

#### Service registration
Expand Down Expand Up @@ -145,5 +170,5 @@ $ kubectl scale sts `release name`-nacos --replicas=3
![img](../images/cluster2.png)

* Use kubectl exec to get the cluster config of the Pods in the nacos StatefulSet after scale StatefulSets

![img](../images/cluster3.png)
Binary file added helm/charts/mysql-1.6.3.tgz
Binary file not shown.
22 changes: 0 additions & 22 deletions helm/charts/mysql/.helmignore

This file was deleted.

5 changes: 0 additions & 5 deletions helm/charts/mysql/Chart.yaml

This file was deleted.

71 changes: 0 additions & 71 deletions helm/charts/mysql/templates/mysql-deployment.yaml

This file was deleted.

10 changes: 0 additions & 10 deletions helm/charts/mysql/templates/mysql-pvc.yaml

This file was deleted.

16 changes: 0 additions & 16 deletions helm/charts/mysql/templates/mysql-service.yaml

This file was deleted.

11 changes: 0 additions & 11 deletions helm/charts/mysql/templates/storageclass.yaml

This file was deleted.

47 changes: 0 additions & 47 deletions helm/charts/mysql/values.yaml

This file was deleted.

6 changes: 6 additions & 0 deletions helm/requirements.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dependencies:
- name: mysql
repository: https://kubernetes-charts.storage.googleapis.com
version: 1.6.3
digest: sha256:15c35804b0f493351f12c6fe039a3837e9e02d2ac9cf62a0b6fa85e26044b96e
generated: "2020-04-25T21:45:10.90741954+08:00"
6 changes: 6 additions & 0 deletions helm/requirements.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dependencies:
- name: mysql
version: 1.6.3
repository: https://kubernetes-charts.storage.googleapis.com
condition: mysql.install
alias: mysql
2 changes: 1 addition & 1 deletion helm/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
2. MODE:
quickstart: you need to modify replicaCount in the values.yaml, .Values.replicaCount=1
standalone: you need to modify replicaCount in the values.yaml, .Values.replicaCount=1
cluster: kubectl scale sts {{ .Release.Namespace }}-nacos --replicas=3
cluster: kubectl -n {{ .Release.Namespace }} scale sts {{ include "nacos.fullname" . }} --replicas=3
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ spec:
{{- if eq .Values.global.mode "cluster" }}
initContainers:
- name: peer-finder-plugin-install
image: nacos/nacos-peer-finder-plugin:1.0
imagePullPolicy: Always
image: "{{ .Values.plugins.repository }}:{{ .Values.plugins.tag}}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
volumeMounts:
- mountPath: /home/nacos/plugins/peer-finder
name: plugindir
Expand Down Expand Up @@ -91,7 +91,7 @@ spec:
- name: SERVICE_NAME
value: "nacos-hs"
- name: DOMAIN_NAME
value: {{ .Values.env.domainNmae | quote }}
value: {{ .Values.env.domainName | quote }}
- name: POD_NAMESPACE
valueFrom:
fieldRef:
Expand Down
6 changes: 3 additions & 3 deletions helm/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ metadata:
name: nacos-cm
data:
{{- with .Values.mysql }}
mysql.db.name: {{ .database }}
mysql.db.name: {{ .mysqlDatabase }}
mysql.port: "3306"
mysql.user: {{ .user }}
mysql.password: {{ .password }}
mysql.user: {{ .mysqlUser }}
mysql.password: {{ .mysqlPassword }}
{{- end }}
{{- end }}
7 changes: 6 additions & 1 deletion helm/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "nacos.fullname" . -}}
{{- $svcPort := .Values.service.port -}}
{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
apiVersion: extensions/v1beta1
{{- end }}
kind: Ingress
metadata:
name: {{ $fullName }}
Expand Down Expand Up @@ -30,7 +35,7 @@ spec:
- path: {{ . }}
backend:
serviceName: nacos-cs
servicePort: http
servicePort: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}
10 changes: 0 additions & 10 deletions helm/templates/storageclass.yaml

This file was deleted.

Loading