From e224732f72ed404a97ef178c91f0fa2c9fd2a3af Mon Sep 17 00:00:00 2001 From: renyunkang Date: Thu, 27 Apr 2023 20:41:40 +0800 Subject: [PATCH] update openelb v0.5.1 Signed-off-by: renyunkang --- src/stable/openelb/Chart.yaml | 4 ++-- src/stable/openelb/templates/configmap.yaml | 19 +++++++++++++++ .../openelb/templates/manager-deployment.yaml | 4 ++++ .../openelb/templates/manager-service.yaml | 9 +++++-- src/stable/openelb/templates/monitor.yaml | 24 +++++++++++++++++++ src/stable/openelb/values.yaml | 10 +++++++- 6 files changed, 65 insertions(+), 5 deletions(-) create mode 100644 src/stable/openelb/templates/configmap.yaml create mode 100644 src/stable/openelb/templates/monitor.yaml diff --git a/src/stable/openelb/Chart.yaml b/src/stable/openelb/Chart.yaml index f0fa79ab..ccd076d2 100644 --- a/src/stable/openelb/Chart.yaml +++ b/src/stable/openelb/Chart.yaml @@ -1,12 +1,12 @@ apiVersion: v2 -appVersion: 0.5.0 +appVersion: 0.5.1 description: Bare Metal Load-balancer for Kubernetes Cluster icon: https://raw.githubusercontent.com/openelb/openelb/master/docs/logo/openelb-vertical.svg maintainers: - email: kubesphere@gmail.com name: KubeSphere name: openelb -version: 0.5.0 +version: 0.5.1 sources: - https://github.com/openelb/openelb type: application diff --git a/src/stable/openelb/templates/configmap.yaml b/src/stable/openelb/templates/configmap.yaml new file mode 100644 index 00000000..89f0a380 --- /dev/null +++ b/src/stable/openelb/templates/configmap.yaml @@ -0,0 +1,19 @@ +{{ if .Values.customImage.enable }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: openelb-images + namespace: {{ template "openelb.namespace" . }} +data: + {{ if (ne .Values.customImage.forwardImage "") }} + forward-image: {{ .Values.customImage.forwardImage }} + {{ end }} + + {{ if (ne .Values.customImage.proxyImage "") }} + proxy-image: {{ .Values.customImage.proxyImage }} + {{ end }} + + {{ if (ne .Values.customImage.vipImage "") }} + keepalived-vip-image: {{ .Values.customImage.vipImage }} + {{ end }} +{{ end }} \ No newline at end of file diff --git a/src/stable/openelb/templates/manager-deployment.yaml b/src/stable/openelb/templates/manager-deployment.yaml index 9ea72f47..5c760d88 100644 --- a/src/stable/openelb/templates/manager-deployment.yaml +++ b/src/stable/openelb/templates/manager-deployment.yaml @@ -33,6 +33,10 @@ spec: args: - --webhook-port={{ .Values.manager.webhookPort }} - --api-hosts={{ .Values.manager.apiHosts }} + {{ if .Values.manager.monitorEnable }} + {{- $metricsAddr := cat ":" .Values.manager.monitorPort |toString -}} + - --metrics-addr={{- nospace $metricsAddr -}} + {{ end }} env: - name: NODE_NAME valueFrom: diff --git a/src/stable/openelb/templates/manager-service.yaml b/src/stable/openelb/templates/manager-service.yaml index 4597d420..b1c6858b 100644 --- a/src/stable/openelb/templates/manager-service.yaml +++ b/src/stable/openelb/templates/manager-service.yaml @@ -3,13 +3,18 @@ kind: Service metadata: name: {{ template "openelb.manager.fullname" . }} labels: + app: openelb-manager {{- include "openelb.manager.labels" . | nindent 4 }} namespace: {{ template "openelb.namespace" . }} spec: + selector: + {{- include "openelb.manager.labels" . | nindent 4 }} ports: - name: https-webhook port: 443 targetPort: webhook - selector: - {{- include "openelb.manager.labels" . | nindent 4 }} + {{ if .Values.manager.monitorEnable }} + - port: {{ .Values.manager.monitorPort }} + name: metrics + {{ end }} type: ClusterIP \ No newline at end of file diff --git a/src/stable/openelb/templates/monitor.yaml b/src/stable/openelb/templates/monitor.yaml new file mode 100644 index 00000000..be897d14 --- /dev/null +++ b/src/stable/openelb/templates/monitor.yaml @@ -0,0 +1,24 @@ +{{ if .Values.manager.monitorEnable }} + +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + labels: + {{- include "openelb.manager.labels" . | nindent 4 }} + name: {{ template "openelb.manager.fullname" . }} + namespace: {{ template "openelb.namespace" . }} +spec: + endpoints: + - path: /metrics + port: metrics + bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token + tlsConfig: + insecureSkipVerify: true + namespaceSelector: + matchNames: + - {{ template "openelb.namespace" . }} + selector: + matchLabels: + app: openelb-manager + +{{ end }} \ No newline at end of file diff --git a/src/stable/openelb/values.yaml b/src/stable/openelb/values.yaml index cb8bcbea..55e7cdc2 100644 --- a/src/stable/openelb/values.yaml +++ b/src/stable/openelb/values.yaml @@ -12,10 +12,12 @@ admission: manager: apiHosts: ":50051" + monitorEnable: false + monitorPort: 50052 webhookPort: 443 image: repository: kubesphere/openelb - tag: v0.5.0 + tag: v0.5.1 pullPolicy: IfNotPresent resources: limits: @@ -36,3 +38,9 @@ manager: serviceAccount: create: true name: openelb-manager + +customImage: + enable: true + vipImage: "" # "kubesphere/kube-keepalived-vip:0.35" + forwardImage: "" # kubesphere/openelb-forward:master + proxyImage: "" # kubesphere/openelb-proxy:master