This is an automated email from the ASF dual-hosted git repository.
hanahmily pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking-kubernetes.git
The following commit(s) were added to refs/heads/master by this push:
new 61d262d add imagePullSecrets and node selector (#65)
61d262d is described below
commit 61d262d5f1b82e85350af473fd848ead37ed46bd
Author: Haiwei Liu <[email protected]>
AuthorDate: Sat Mar 13 05:57:24 2021 +0800
add imagePullSecrets and node selector (#65)
* add imagePullSecrets and node selector
Signed-off-by: Haiwei Liu <[email protected]>
* add doc configuration
Signed-off-by: Haiwei Liu <[email protected]>
---
.gitignore | 1 +
chart/skywalking/README.md | 7 +++++++
chart/skywalking/templates/es-init.job.yaml | 19 +++++++++++++++++++
chart/skywalking/templates/oap-deployment.yaml | 4 ++++
chart/skywalking/templates/ui-deployment.yaml | 17 +++++++++++++++++
chart/skywalking/values.yaml | 10 ++++++++++
6 files changed, 58 insertions(+)
diff --git a/.gitignore b/.gitignore
index 495004e..2120144 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
.DS_Store
*~
.idea
+.vscode
\ No newline at end of file
diff --git a/chart/skywalking/README.md b/chart/skywalking/README.md
index 395e352..1ab6d91 100644
--- a/chart/skywalking/README.md
+++ b/chart/skywalking/README.md
@@ -42,6 +42,7 @@ The following table lists the configurable parameters of the
Skywalking chart an
|--------------------------------------------------------------|--------------------------------------------------------------------------------------------------|--------------------------------------|
| `nameOverride` | Override name
| `nil` |
| `serviceAccounts.oap` | Name of the
OAP service account to use or create
| `nil` |
+| `imagePullSecrets` | Image pull
secrets
| `[]` |
| `oap.name` | OAP
deployment name
| `oap` |
| `oap.dynamicConfigEnabled` | Enable oap
dynamic configuration through k8s configmap
| `false` |
| `oap.image.repository` | OAP container
image name
| `apache/skywalking-oap-server` |
@@ -64,6 +65,9 @@ The following table lists the configurable parameters of the
Skywalking chart an
| `ui.image.repository` | Web UI
container image name
| `apache/skywalking-ui` |
| `ui.image.tag` | Web UI
container image tag
| `6.1.0` |
| `ui.image.pullPolicy` | Web UI
container image pull policy
| `IfNotPresent` |
+| `ui.nodeAffinity` | Web UI node
affinity policy
| `{}` |
+| `ui.nodeSelector` | Web UI labels
for pod assignment
| `{}` |
+| `ui.tolerations` | Web UI
tolerations
| `[]` |
| `ui.ingress.enabled` | Create
Ingress for Web UI
| `false` |
| `ui.ingress.annotations` | Associate
annotations to the Ingress
| `{}` |
| `ui.ingress.path` | Associate
path with the Ingress
| `/` |
@@ -76,6 +80,9 @@ The following table lists the configurable parameters of the
Skywalking chart an
| `ui.service.loadBalancerIP` | Load Balancer
IP address
| `nil` |
| `ui.service.annotations` | Kubernetes
service annotations
| `{}` |
| `ui.service.loadBalancerSourceRanges` | Limit load
balancer source IPs to list of CIDRs (where available))
| `[]` |
+| `esInit.nodeAffinity` | ES init job
node affinity policy
| `{}` |
+| `esInit.nodeSelector` | ES init job
labels for master pod assignment
| `{}` |
+| `esInit.tolerations` | ES init job
tolerations
| `[]` |
| `elasticsearch.enabled` | Spin up a new
elasticsearch cluster for SkyWalking
| `true` |
| `elasticsearch.clusterName` | This will be used as the
Elasticsearch
[cluster.name](https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster.name.html)
and should be unique per cluster in the namespace
| `elasticsearch`
|
| `elasticsearch.nodeGroup` | This is the name that will be
used for each group of nodes in the cluster. The name will be
`clusterName-nodeGroup-X`
| `master`
|
diff --git a/chart/skywalking/templates/es-init.job.yaml
b/chart/skywalking/templates/es-init.job.yaml
index 393dc87..7437e19 100644
--- a/chart/skywalking/templates/es-init.job.yaml
+++ b/chart/skywalking/templates/es-init.job.yaml
@@ -35,6 +35,25 @@ spec:
component: "{{ template "skywalking.fullname" . }}-job"
release: {{ .Release.Name }}
spec:
+ {{- if .Values.esInit.nodeAffinity }}
+ affinity:
+ {{- end }}
+ {{- with .Values.esInit.nodeAffinity }}
+ nodeAffinity:
+{{ toYaml . | indent 10 }}
+ {{- end }}
+{{- if .Values.esInit.nodeSelector }}
+ nodeSelector:
+{{ toYaml .Values.esInit.nodeSelector | indent 8 }}
+{{- end }}
+{{- if .Values.esInit.tolerations }}
+ tolerations:
+{{ toYaml .Values.esInit.tolerations | indent 8 }}
+{{- end }}
+{{- if .Values.imagePullSecrets }}
+ imagePullSecrets:
+{{ toYaml .Values.imagePullSecrets | indent 8 }}
+{{- end }}
restartPolicy: Never
initContainers:
{{- include "skywalking.containers.wait-for-es" . | nindent 6 }}
diff --git a/chart/skywalking/templates/oap-deployment.yaml
b/chart/skywalking/templates/oap-deployment.yaml
index 4867a8d..40f1ce4 100644
--- a/chart/skywalking/templates/oap-deployment.yaml
+++ b/chart/skywalking/templates/oap-deployment.yaml
@@ -76,6 +76,10 @@ spec:
tolerations:
{{ toYaml .Values.oap.tolerations | indent 8 }}
{{- end }}
+{{- if .Values.imagePullSecrets }}
+ imagePullSecrets:
+{{ toYaml .Values.imagePullSecrets | indent 8 }}
+{{- end }}
initContainers:
{{- if hasPrefix "elasticsearch" .Values.oap.storageType }}
{{- include "skywalking.containers.wait-for-es" . | nindent 6 }}
diff --git a/chart/skywalking/templates/ui-deployment.yaml
b/chart/skywalking/templates/ui-deployment.yaml
index 9681660..f071b32 100644
--- a/chart/skywalking/templates/ui-deployment.yaml
+++ b/chart/skywalking/templates/ui-deployment.yaml
@@ -41,6 +41,23 @@ spec:
{{ toYaml .Values.ui.podAnnotations | indent 8 }}
{{- end }}
spec:
+ affinity:
+ {{- with .Values.ui.nodeAffinity }}
+ nodeAffinity:
+{{ toYaml . | indent 10 }}
+ {{- end }}
+{{- if .Values.ui.nodeSelector }}
+ nodeSelector:
+{{ toYaml .Values.ui.nodeSelector | indent 8 }}
+{{- end }}
+{{- if .Values.ui.tolerations }}
+ tolerations:
+{{ toYaml .Values.ui.tolerations | indent 8 }}
+{{- end }}
+{{- if .Values.imagePullSecrets }}
+ imagePullSecrets:
+{{ toYaml .Values.imagePullSecrets | indent 8 }}
+{{- end }}
containers:
- name: {{ .Values.ui.name }}
image: {{ .Values.ui.image.repository }}:{{ required "ui.image.tag is
required" .Values.ui.image.tag }}
diff --git a/chart/skywalking/values.yaml b/chart/skywalking/values.yaml
index 7607e5c..9e314f9 100644
--- a/chart/skywalking/values.yaml
+++ b/chart/skywalking/values.yaml
@@ -20,6 +20,8 @@
serviceAccounts:
oap:
+imagePullSecrets: []
+
initContainer:
image: busybox
tag: '1.30'
@@ -75,6 +77,9 @@ ui:
pullPolicy: IfNotPresent
# podAnnotations:
# example: oap-foo
+ nodeAffinity: {}
+ nodeSelector: {}
+ tolerations: []
ingress:
enabled: false
annotations: {}
@@ -108,6 +113,11 @@ ui:
## Limit load balancer source ips to list of CIDRs (where available)
# loadBalancerSourceRanges: []
+esInit:
+ nodeAffinity: {}
+ nodeSelector: {}
+ tolerations: []
+
elasticsearch:
enabled: true
config: # For users of an existing elasticsearch cluster,takes
effect when `elasticsearch.enabled` is false