Skip to content

Commit

Permalink
Fix/cloud port (#4271)
Browse files Browse the repository at this point in the history
* patch cloud_port to ingress nginx controller

* fix cloud port
  • Loading branch information
bxy4543 authored Nov 8, 2023
1 parent 2113d17 commit c4e8187
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion controllers/terminal/deploy/Kubefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ COPY manifests manifests

ENV userNamespace="user-system"
ENV cloudDomain="127.0.0.1.nip.io"
ENV port=""
ENV cloudPort=""
ENV wildcardCertSecretName="wildcard-cert"
ENV wildcardCertSecretNamespace="sealos-system"

Expand Down
2 changes: 1 addition & 1 deletion controllers/terminal/deploy/manifests/deploy.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ spec:
- name: DOMAIN
value: {{ .cloudDomain }}
- name: PORT
value: {{ .port }}
value: {{ .cloudPort }}
- name: SECRET_NAME
value: {{ .wildcardCertSecretName }}
- name: SECRET_NAMESPACE
Expand Down
4 changes: 2 additions & 2 deletions frontend/providers/cronjob/deploy/manifests/appcr.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ metadata:
spec:
data:
desc: CronJob
url: "https://cronjob.{{ .cloudDomain }}"
icon: "https://cronjob.{{ .cloudDomain }}/logo.svg"
url: "https://cronjob.{{ .cloudDomain }}{{ if .cloudPort }}:{{ .cloudPort }}{{ end }}"
icon: "https://cronjob.{{ .cloudDomain }}{{ if .cloudPort }}:{{ .cloudPort }}{{ end }}/logo.svg"
menuData:
helpDropDown: false
nameColor: text-black
Expand Down
4 changes: 2 additions & 2 deletions frontend/providers/license/deploy/manifests/appcr.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ metadata:
spec:
data:
desc: license
url: "https://license.{{ .cloudDomain }}"
icon: "https://license.{{ .cloudDomain }}/logo.svg"
url: "https://license.{{ .cloudDomain }}{{ if .cloudPort }}:{{ .cloudPort }}{{ end }}"
icon: "https://license.{{ .cloudDomain }}{{ if .cloudPort }}:{{ .cloudPort }}{{ end }}/logo.svg"
menuData:
helpDropDown: false
nameColor: text-black
Expand Down
3 changes: 2 additions & 1 deletion scripts/cloud/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ collect_input() {
fi
done
fi
if [[ -z "$node_ips" ]]; then
if [[ -z "$node_ips" && $single != "y" ]]; then
while :; do
read -p "$(get_prompt "input_node_ips")" node_ips
if validate_ips "$node_ips"; then
Expand Down Expand Up @@ -443,6 +443,7 @@ EOF

get_prompt "patching_ingress"
kubectl -n ingress-nginx patch ds ingress-nginx-controller -p '{"spec":{"template":{"spec":{"tolerations":[{"key":"node-role.kubernetes.io/control-plane","operator":"Exists","effect":"NoSchedule"}]}}}}'
kubectl get daemonset ingress-nginx-controller -n ingress-nginx -o json | grep https-port= >/dev/null || kubectl patch daemonset ingress-nginx-controller -n ingress-nginx --type='json' -p="[{'op': 'add', 'path': '/spec/template/spec/containers/0/args/-', 'value': '--https-port=${cloud_port:-443}'}]"

get_prompt "installing_cloud"

Expand Down

0 comments on commit c4e8187

Please sign in to comment.