Skip to content

Commit

Permalink
build(tiup-publisher): fix image repo and chart (#175)
Browse files Browse the repository at this point in the history
Signed-off-by: wuhuizuo <[email protected]>

Signed-off-by: wuhuizuo <[email protected]>
  • Loading branch information
wuhuizuo authored Oct 8, 2024
1 parent 59d5715 commit 645b571
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 43 deletions.
23 changes: 1 addition & 22 deletions charts/tiup-publisher/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,22 +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 }}{{ .path }}
{{- 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 "tiup-publisher.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 "tiup-publisher.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "tiup-publisher.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 "tiup-publisher.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
{{- end }}
It is a consumer worker, no public serivce.
8 changes: 4 additions & 4 deletions charts/tiup-publisher/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ spec:
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
{{- with .Values.args }}
args:
{{- toYaml . | nindent 12 }}
{{- end }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: {{ .Values.service.port }}
protocol: TCP
livenessProbe:
httpGet:
path: /
Expand Down
15 changes: 0 additions & 15 deletions charts/tiup-publisher/templates/tests/test-connection.yaml

This file was deleted.

3 changes: 2 additions & 1 deletion charts/tiup-publisher/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
# Declare variables to be passed into your templates.

replicaCount: 1

args: []
# - --config=/etc/config/config.yaml
image:
repository: ghcr.io/pingcap-qe/ee-apps/tiup-publisher
pullPolicy: IfNotPresent
Expand Down
2 changes: 1 addition & 1 deletion tiup-publisher/skaffold.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
build:
platforms: ["linux/amd64", "linux/arm64"]
artifacts:
- image: dl
- image: tiup-publisher
docker:
dockerfile: Dockerfile
local:
Expand Down

0 comments on commit 645b571

Please sign in to comment.