Skip to content

Commit

Permalink
deploy: use kustomize for ingress mode
Browse files Browse the repository at this point in the history
Signed-off-by: warjiang <1096409085@qq.com>
  • Loading branch information
warjiang committed Sep 4, 2024
1 parent 084396f commit f01759a
Show file tree
Hide file tree
Showing 4 changed files with 153 additions and 0 deletions.
1 change: 1 addition & 0 deletions artifacts/overlays/ingress-mode/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.dockerconfigjson
79 changes: 79 additions & 0 deletions artifacts/overlays/ingress-mode/dashboard-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
docker_registries: []
chart_registries: []
# path_prefix: '/karmada'
path_prefix: ''
menu_configs:
- path: /overview
enable: true
sidebar_key: OVERVIEW
- path: /multicloud-resource-manage
enable: true
sidebar_key: MULTICLOUD-RESOURCE-MANAGE
children:
- path: namespace
enable: true
sidebar_key: NAMESPACE
- path: workload
enable: true
sidebar_key: WORKLOAD
- path: service
enable: true
sidebar_key: SERVICE
- path: config
enable: true
sidebar_key: CONFIG
- path: /multicloud-policy-manage
enable: true
sidebar_key: MULTICLOUD-POLICY-MANAGE
children:
- path: propagation-policy
enable: true
sidebar_key: PROPAGATION-POLICY
- path: override-policy
enable: true
sidebar_key: OVERRIDE-POLICY
- path: /cluster-manage
enable: true
sidebar_key: CLUSTER-MANAGE
- path: /basic-config
enable: true
sidebar_key: BASIC-CONFIG
children:
- path: oem
enable: false
sidebar_key: OEM
- path: upgrade
enable: false
sidebar_key: UPGRADE
- path: karmada-config
enable: true
sidebar_key: KARMADA-CONFIG
- path: helm
enable: true
sidebar_key: HELM
- path: registry
enable: true
sidebar_key: REGISTRY
- path: /advanced-config
enable: false
sidebar_key: ADVANCED-CONFIG
children:
- path: failover
enable: true
sidebar_key: FAILOVER
- path: reschedule
enable: true
sidebar_key: RESCHEDULE
- path: permission
enable: true
sidebar_key: PERMISSION
- path: /addon
enable: false
sidebar_key: ADDON
children:
- path: buildin
enable: true
sidebar_key: BUILDIN
- path: thirdparty
enable: true
sidebar_key: THIRDPARTY
14 changes: 14 additions & 0 deletions artifacts/overlays/ingress-mode/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: ingress-karmada-dashboard
namespace: karmada-system
spec:
rules:
- http:
paths:
- backend:
serviceName: karmada-dashboard-web
servicePort: 8000
path: /
pathType: ImplementationSpecific
59 changes: 59 additions & 0 deletions artifacts/overlays/ingress-mode/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- ../../dashboard
- ./ingress.yaml

configMapGenerator:
- name: karmada-dashboard-configmap
namespace: karmada-system
behavior: replace
files:
- prod.yaml=dashboard-config.yaml

# If you want to create secret for private registry, uncomment it
#secretGenerator:
# - name: regcred
# namespace: karmada-system
# files:
# - .dockerconfigjson
# type: kubernetes.io/dockerconfigjson

# Uncomment the patch rules to make change to ingress
#patches:
# By default, the ingress-mode will export karmada-dashboard-web with no-domain specified and served with location '/'
# If you want to specify domain or change the location path, you can uncomment the following patch code
# - target:
# kind: Ingress
# name: ingress-karmada-dashboard
# namespace: karmada-system
# patch: |-
# # If you want to specify domain, you can uncomment the first patch rules
# - op: add
# path: /spec/rules/0/host
# value: "www.example.com"
# # If you want to change the location path from '/' to customized path, you can uncomment the following patch rules
# # Noticed: the path value should be consisted with 'path_prefix' field in the './dashboard-config.yaml'
# - op: replace
# path: /spec/rules/0/http/paths/0/path
# value: "/karmada"
# # Uncomment the next two patch rules to add imagePullSecrets to deployment
# - target:
# kind: Deployment
# name: karmada-dashboard-web
# namespace: karmada-system
# patch: |-
# - op: add
# path: /spec/template/spec/imagePullSecrets
# value: [{ name: regcred }]
# - target:
# kind: Deployment
# name: karmada-dashboard-api
# namespace: karmada-system
# patch: |-
# - op: add
# path: /spec/template/spec/imagePullSecrets
# value: [{ name: regcred }]


0 comments on commit f01759a

Please sign in to comment.