From f47ca0f4da604cd53e4358e056caedac50a64597 Mon Sep 17 00:00:00 2001 From: Jianbo Sun Date: Fri, 2 Apr 2021 10:58:07 +0800 Subject: [PATCH] remove no used ingress notes in charts (#1405) * remove no used ingress notes in charts * remove helm repo update --- Makefile | 1 - charts/vela-core/templates/NOTES.txt | 22 +--------- charts/vela-core/templates/ingress.yaml | 41 ------------------- .../templates/tests/test-connection.yaml | 15 ------- charts/vela-core/values.yaml | 18 -------- docs/en/install.mdx | 17 ++++---- 6 files changed, 8 insertions(+), 106 deletions(-) delete mode 100644 charts/vela-core/templates/ingress.yaml delete mode 100644 charts/vela-core/templates/tests/test-connection.yaml diff --git a/Makefile b/Makefile index ab846c38f..f1803f2d3 100644 --- a/Makefile +++ b/Makefile @@ -142,7 +142,6 @@ docker-push: e2e-setup: helm install --create-namespace -n flux-system helm-flux http://oam.dev/catalog/helm-flux2-0.1.0.tgz helm install kruise https://github.com/openkruise/kruise/releases/download/v0.7.0/kruise-chart.tgz - helm repo update helm upgrade --install --create-namespace --namespace vela-system --set image.pullPolicy=IfNotPresent --set image.repository=vela-core-test --set image.tag=$(GIT_COMMIT) --wait kubevela ./charts/vela-core ginkgo version ginkgo -v -r e2e/setup diff --git a/charts/vela-core/templates/NOTES.txt b/charts/vela-core/templates/NOTES.txt index cb00aa1c1..2abe8235b 100644 --- a/charts/vela-core/templates/NOTES.txt +++ b/charts/vela-core/templates/NOTES.txt @@ -1,21 +1 @@ -1. Get the application URL by running these commands: -{{- if .Values.ingress.enabled }} -{{- range $host := .Values.ingress.hosts }} - {{- range .paths }} - http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ . }} - {{- end }} -{{- end }} -{{- else if contains "NodePort" .Values.service.type }} - export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "kubevela.fullname" . }}) - export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") - echo http://$NODE_IP:$NODE_PORT -{{- else if contains "LoadBalancer" .Values.service.type }} - NOTE: It may take a few minutes for the LoadBalancer IP to be available. - You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "kubevela.fullname" . }}' - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "kubevela.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") - echo http://$SERVICE_IP:{{ .Values.service.port }} -{{- else if contains "ClusterIP" .Values.service.type }} - export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "kubevela.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") - echo "Visit http://127.0.0.1:8080 to use your application" - kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:80 -{{- end }} +Welcome to use the KubeVela! Enjoy your shipping application journey! \ No newline at end of file diff --git a/charts/vela-core/templates/ingress.yaml b/charts/vela-core/templates/ingress.yaml deleted file mode 100644 index 75863a6ce..000000000 --- a/charts/vela-core/templates/ingress.yaml +++ /dev/null @@ -1,41 +0,0 @@ -{{- if .Values.ingress.enabled -}} -{{- $fullName := include "kubevela.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 }} - labels: - {{- include "kubevela.labels" . | nindent 4 }} - {{- with .Values.ingress.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: -{{- if .Values.ingress.tls }} - tls: - {{- range .Values.ingress.tls }} - - hosts: - {{- range .hosts }} - - {{ . | quote }} - {{- end }} - secretName: {{ .secretName }} - {{- end }} -{{- end }} - rules: - {{- range .Values.ingress.hosts }} - - host: {{ .host | quote }} - http: - paths: - {{- range .paths }} - - path: {{ . }} - backend: - serviceName: {{ $fullName }} - servicePort: {{ $svcPort }} - {{- end }} - {{- end }} -{{- end }} diff --git a/charts/vela-core/templates/tests/test-connection.yaml b/charts/vela-core/templates/tests/test-connection.yaml deleted file mode 100644 index 5afd9bf3a..000000000 --- a/charts/vela-core/templates/tests/test-connection.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - name: "{{ include "kubevela.fullname" . }}-test-connection" - labels: - {{- include "kubevela.labels" . | nindent 4 }} - annotations: - "helm.sh/hook": test-success -spec: - containers: - - name: wget - image: busybox - command: ['wget'] - args: ['{{ include "kubevela.fullname" . }}:{{ .Values.service.port }}'] - restartPolicy: Never diff --git a/charts/vela-core/values.yaml b/charts/vela-core/values.yaml index 96b321bdc..762fadfae 100644 --- a/charts/vela-core/values.yaml +++ b/charts/vela-core/values.yaml @@ -38,24 +38,6 @@ securityContext: {} # runAsNonRoot: true # runAsUser: 1000 -service: - type: ClusterIP - port: 80 - -ingress: - enabled: false - annotations: {} - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" - hosts: - - host: chart-example.local - paths: [] - tls: [] - # - secretName: chart-example-tls - # hosts: - # - chart-example.local - - resources: limits: cpu: 500m diff --git a/docs/en/install.mdx b/docs/en/install.mdx index 535020946..6eb4b02a9 100644 --- a/docs/en/install.mdx +++ b/docs/en/install.mdx @@ -118,16 +118,13 @@ These steps will install KubeVela controller and its dependency. helm install --create-namespace -n vela-system kubevela kubevela/vela-core --version -rc-master ``` ```console - NAME: kubevela - LAST DEPLOYED: Sat Mar 6 21:03:11 2021 - NAMESPACE: vela-system - STATUS: deployed - REVISION: 1 - NOTES: - 1. Get the application URL by running these commands: - export POD_NAME=$(kubectl get pods --namespace vela-system -l "app.kubernetes.io/name=vela-core,app.kubernetes.io/instance=kubevela" -o jsonpath="{.items[0].metadata.name}") - echo "Visit http://127.0.0.1:8080 to use your application" - kubectl --namespace vela-system port-forward $POD_NAME 8080:80 + NAME: kubevela + LAST DEPLOYED: Thu Apr 1 19:41:30 2021 + NAMESPACE: vela-system + STATUS: deployed + REVISION: 1 + NOTES: + Welcome to use the KubeVela! Enjoy your shipping application journey! ``` 4. Install Kubevela with cert-manager (optional)