Skip to content

Commit

Permalink
Create empty index.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
cubxxw committed Dec 4, 2023
1 parent b245655 commit 850e0a4
Show file tree
Hide file tree
Showing 11 changed files with 36 additions and 36 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
# run: |
# helm repo add bitnami https://charts.bitnami.com/bitnami
# helm repo add grafana https://grafana.github.io/helm-charts
# helm repo add openim https://prometheus-community.github.io/helm-charts
# helm repo add openim https://openim.github.io/helm-charts

- name: Run chart-releaser
uses: helm/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion charts/openim-admin/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v2
name: openim-admin-front
name: openim-admin
description: A Helm chart for Kubernetes

# A chart can be either an 'application' or a 'library' chart.
Expand Down
8 changes: 4 additions & 4 deletions charts/openim-admin/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
{{- 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 "openim-admin-front.fullname" . }})
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "openim-admin.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 "openim-admin-front.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "openim-admin-front.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "openim-admin.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "openim-admin.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 "openim-admin-front.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "openim-admin.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT
Expand Down
20 changes: 10 additions & 10 deletions charts/openim-admin/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "openim-admin-front.name" -}}
{{- define "openim-admin.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

Expand All @@ -10,7 +10,7 @@ Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "openim-admin-front.fullname" -}}
{{- define "openim-admin.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
Expand All @@ -26,16 +26,16 @@ If release name contains chart name it will be used as a full name.
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "openim-admin-front.chart" -}}
{{- define "openim-admin.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "openim-admin-front.labels" -}}
helm.sh/chart: {{ include "openim-admin-front.chart" . }}
{{ include "openim-admin-front.selectorLabels" . }}
{{- define "openim-admin.labels" -}}
helm.sh/chart: {{ include "openim-admin.chart" . }}
{{ include "openim-admin.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
Expand All @@ -45,17 +45,17 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
{{/*
Selector labels
*/}}
{{- define "openim-admin-front.selectorLabels" -}}
app.kubernetes.io/name: {{ include "openim-admin-front.name" . }}
{{- define "openim-admin.selectorLabels" -}}
app.kubernetes.io/name: {{ include "openim-admin.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
{{- define "openim-admin-front.serviceAccountName" -}}
{{- define "openim-admin.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "openim-admin-front.fullname" .) .Values.serviceAccount.name }}
{{- default (include "openim-admin.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
Expand Down
10 changes: 5 additions & 5 deletions charts/openim-admin/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "openim-admin-front.fullname" . }}
name: {{ include "openim-admin.fullname" . }}
labels:
{{- include "openim-admin-front.labels" . | nindent 4 }}
{{- include "openim-admin.labels" . | nindent 4 }}
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
selector:
matchLabels:
{{- include "openim-admin-front.selectorLabels" . | nindent 6 }}
{{- include "openim-admin.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "openim-admin-front.selectorLabels" . | nindent 8 }}
{{- include "openim-admin.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "openim-admin-front.serviceAccountName" . }}
serviceAccountName: {{ include "openim-admin.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
Expand Down
6 changes: 3 additions & 3 deletions charts/openim-admin/templates/hpa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "openim-admin-front.fullname" . }}
name: {{ include "openim-admin.fullname" . }}
labels:
{{- include "openim-admin-front.labels" . | nindent 4 }}
{{- include "openim-admin.labels" . | nindent 4 }}
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ include "openim-admin-front.fullname" . }}
name: {{ include "openim-admin.fullname" . }}
minReplicas: {{ .Values.autoscaling.minReplicas }}
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
metrics:
Expand Down
4 changes: 2 additions & 2 deletions charts/openim-admin/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "openim-admin-front.fullname" . -}}
{{- $fullName := include "openim-admin.fullname" . -}}
{{- $svcPort := .Values.service.port -}}
{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }}
{{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }}
Expand All @@ -17,7 +17,7 @@ kind: Ingress
metadata:
name: {{ $fullName }}
labels:
{{- include "openim-admin-front.labels" . | nindent 4 }}
{{- include "openim-admin.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
Expand Down
6 changes: 3 additions & 3 deletions charts/openim-admin/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "openim-admin-front.fullname" . }}
name: {{ include "openim-admin.fullname" . }}
labels:
{{- include "openim-admin-front.labels" . | nindent 4 }}
{{- include "openim-admin.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
ports:
Expand All @@ -12,4 +12,4 @@ spec:
protocol: TCP
name: http
selector:
{{- include "openim-admin-front.selectorLabels" . | nindent 4 }}
{{- include "openim-admin.selectorLabels" . | nindent 4 }}
4 changes: 2 additions & 2 deletions charts/openim-admin/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "openim-admin-front.serviceAccountName" . }}
name: {{ include "openim-admin.serviceAccountName" . }}
labels:
{{- include "openim-admin-front.labels" . | nindent 4 }}
{{- include "openim-admin.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
Expand Down
6 changes: 3 additions & 3 deletions charts/openim-admin/templates/tests/test-connection.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
apiVersion: v1
kind: Pod
metadata:
name: "{{ include "openim-admin-front.fullname" . }}-test-connection"
name: "{{ include "openim-admin.fullname" . }}-test-connection"
labels:
{{- include "openim-admin-front.labels" . | nindent 4 }}
{{- include "openim-admin.labels" . | nindent 4 }}
annotations:
"helm.sh/hook": test
spec:
containers:
- name: wget
image: busybox
command: ['wget']
args: ['{{ include "openim-admin-front.fullname" . }}:{{ .Values.service.port }}']
args: ['{{ include "openim-admin.fullname" . }}:{{ .Values.service.port }}']
restartPolicy: Never
4 changes: 2 additions & 2 deletions charts/openim-admin/values.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Default values for openim-admin-front.
# Default values for openim-admin.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

replicaCount: 1

image:
repository: ghcr.io/openimsdk/openim-admin-front
repository: ghcr.io/openimsdk/openim-admin
pullPolicy: Always
# Overrides the image tag whose default is the chart appVersion.
tag: "latest"
Expand Down

0 comments on commit 850e0a4

Please sign in to comment.