diff --git a/stacks/azure/application/centraldashboard/deployment_patch.yaml b/stacks/azure/application/centraldashboard/deployment_patch.yaml new file mode 100644 index 000000000..fb2a10b93 --- /dev/null +++ b/stacks/azure/application/centraldashboard/deployment_patch.yaml @@ -0,0 +1,12 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: centraldashboard +spec: + template: + spec: + containers: + - name: centraldashboard + env: + - name: DASHBOARD_LINKS_CONFIGMAP + value: centraldashboard-links-config \ No newline at end of file diff --git a/stacks/azure/application/centraldashboard/kustomization.yaml b/stacks/azure/application/centraldashboard/kustomization.yaml new file mode 100644 index 000000000..363da29c4 --- /dev/null +++ b/stacks/azure/application/centraldashboard/kustomization.yaml @@ -0,0 +1,8 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +namespace: kubeflow +resources: +- ../../../../common/centraldashboard/overlays/stacks +patchesStrategicMerge: +- links-configmap.yaml +- deployment_patch.yaml diff --git a/stacks/azure/application/centraldashboard/links-configmap.yaml b/stacks/azure/application/centraldashboard/links-configmap.yaml new file mode 100644 index 000000000..51091f2be --- /dev/null +++ b/stacks/azure/application/centraldashboard/links-configmap.yaml @@ -0,0 +1,67 @@ +apiVersion: v1 +data: + links: |- + { + "menuLinks": [ + { + "link": "/pipeline/", + "text": "Pipelines" + }, + { + "link": "/jupyter/", + "text": "Notebook Servers" + }, + { + "link": "/katib/", + "text": "Katib" + } + ], + "externalLinks": [], + "quickLinks": [ + { + "text": "Upload a pipeline", + "desc": "Pipelines", + "link": "/pipeline/" + }, + { + "text": "View all pipeline runs", + "desc": "Pipelines", + "link": "/pipeline/#/runs" + }, + { + "text": "Create a new Notebook server", + "desc": "Notebook Servers", + "link": "/jupyter/new?namespace=kubeflow" + }, + { + "text": "View Katib Experiments", + "desc": "Katib", + "link": "/katib/" + } + ], + "documentationItems": [ + { + "text": "Kubeflow Overview", + "desc": "An overview of Kubeflow architecture and workflows", + "link": "https://www.kubeflow.org/docs/started/kubeflow-overview/" + }, + { + "text": "Kubeflow on Azure", + "desc": "Running Kubeflow on AKS and Microsoft Azure", + "link": "https://www.kubeflow.org/docs/azure/" + }, + { + "text": "Azure Machine Learning Docs", + "desc": "Azure Machine Learning Documentation", + "link": "https://aka.ms/kubeflow-azureml-docs" + }, + { + "text": "Azure Kubernetes Service Docs", + "desc": "Azure Kubernetes Service Documentation", + "link": "https://aka.ms/kubeflow-aks-docs" + }, + ] + } +kind: ConfigMap +metadata: + name: centraldashboard-links-config diff --git a/stacks/azure/application/jupyter-web-app/base/kustomization.yaml b/stacks/azure/application/jupyter-web-app/base/kustomization.yaml index 367956394..fc71eac77 100644 --- a/stacks/azure/application/jupyter-web-app/base/kustomization.yaml +++ b/stacks/azure/application/jupyter-web-app/base/kustomization.yaml @@ -10,7 +10,7 @@ namespace: kubeflow images: - name: gcr.io/kubeflow-images-public/jupyter-web-app newName: gcr.io/kubeflow-images-public/jupyter-web-app - newTag: vmaster-gd9be4b9e + newTag: vmaster-g845af298 resources: - ../../../../../jupyter/jupyter-web-app/base/cluster-role-binding.yaml - ../../../../../jupyter/jupyter-web-app/base/cluster-role.yaml diff --git a/stacks/azure/kustomization.yaml b/stacks/azure/kustomization.yaml index 2184a67aa..ab6ef6399 100644 --- a/stacks/azure/kustomization.yaml +++ b/stacks/azure/kustomization.yaml @@ -3,13 +3,13 @@ kind: Kustomization namespace: kubeflow resources: - ../../admission-webhook/webhook/v3 - - ../../common/centraldashboard/overlays/stacks - ../../kubeflow-roles/base - ./application/jupyter-web-app - ../../jupyter/notebook-controller/base_v3 - ../../profiles/base_v3 - ./application/spark-operator - ./application/spartakus + - ./application/centraldashboard # Training Operators - ../../pytorch-job/pytorch-job-crds/overlays/application - ../../pytorch-job/pytorch-operator/overlays/application diff --git a/tests/stacks/azure/application/centraldashboard/kustomize_test.go b/tests/stacks/azure/application/centraldashboard/kustomize_test.go new file mode 100644 index 000000000..ad12776cf --- /dev/null +++ b/tests/stacks/azure/application/centraldashboard/kustomize_test.go @@ -0,0 +1,15 @@ +package centraldashboard + +import ( + "github.com/kubeflow/manifests/tests" + "testing" +) + +func TestKustomize(t *testing.T) { + testCase := &tests.KustomizeTestCase{ + Package: "../../../../../stacks/azure/application/centraldashboard", + Expected: "test_data/expected", + } + + tests.RunTestCase(t, testCase) +} diff --git a/tests/stacks/azure/application/centraldashboard/test_data/expected/app.k8s.io_v1beta1_application_centraldashboard.yaml b/tests/stacks/azure/application/centraldashboard/test_data/expected/app.k8s.io_v1beta1_application_centraldashboard.yaml new file mode 100644 index 000000000..b4e7f9a32 --- /dev/null +++ b/tests/stacks/azure/application/centraldashboard/test_data/expected/app.k8s.io_v1beta1_application_centraldashboard.yaml @@ -0,0 +1,53 @@ +apiVersion: app.k8s.io/v1beta1 +kind: Application +metadata: + labels: + app.kubernetes.io/component: centraldashboard + app.kubernetes.io/name: centraldashboard + name: centraldashboard + namespace: kubeflow +spec: + addOwnerRef: true + componentKinds: + - group: core + kind: ConfigMap + - group: apps + kind: Deployment + - group: rbac.authorization.k8s.io + kind: Role + - group: rbac.authorization.k8s.io + kind: RoleBinding + - group: core + kind: Service + - group: core + kind: ServiceAccount + - group: networking.istio.io + kind: VirtualService + descriptor: + description: Provides a Dashboard UI for kubeflow + keywords: + - centraldashboard + - kubeflow + links: + - description: About + url: https://github.com/kubeflow/kubeflow/tree/master/components/centraldashboard + maintainers: + - email: prodonjs@gmail.com + name: Jason Prodonovich + - email: apverma@google.com + name: Apoorv Verma + - email: adhita94@gmail.com + name: Adhita Selvaraj + owners: + - email: prodonjs@gmail.com + name: Jason Prodonovich + - email: apverma@google.com + name: Apoorv Verma + - email: adhita94@gmail.com + name: Adhita Selvaraj + type: centraldashboard + version: v1beta1 + selector: + matchLabels: + app.kubernetes.io/component: centraldashboard + app.kubernetes.io/name: centraldashboard diff --git a/tests/stacks/azure/application/centraldashboard/test_data/expected/apps_v1_deployment_centraldashboard.yaml b/tests/stacks/azure/application/centraldashboard/test_data/expected/apps_v1_deployment_centraldashboard.yaml new file mode 100644 index 000000000..f27337326 --- /dev/null +++ b/tests/stacks/azure/application/centraldashboard/test_data/expected/apps_v1_deployment_centraldashboard.yaml @@ -0,0 +1,52 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: centraldashboard + app.kubernetes.io/component: centraldashboard + app.kubernetes.io/name: centraldashboard + name: centraldashboard + namespace: kubeflow +spec: + replicas: 1 + selector: + matchLabels: + app: centraldashboard + app.kubernetes.io/component: centraldashboard + app.kubernetes.io/name: centraldashboard + template: + metadata: + annotations: + sidecar.istio.io/inject: "false" + labels: + app: centraldashboard + app.kubernetes.io/component: centraldashboard + app.kubernetes.io/name: centraldashboard + spec: + containers: + - env: + - name: USERID_HEADER + valueFrom: + configMapKeyRef: + key: userid-header + name: kubeflow-config + - name: USERID_PREFIX + valueFrom: + configMapKeyRef: + key: userid-prefix + name: kubeflow-config + - name: DASHBOARD_LINKS_CONFIGMAP + value: centraldashboard-links-config + image: gcr.io/kubeflow-images-public/centraldashboard:vmaster-g8097cfeb + imagePullPolicy: IfNotPresent + livenessProbe: + httpGet: + path: /healthz + port: 8082 + initialDelaySeconds: 30 + periodSeconds: 30 + name: centraldashboard + ports: + - containerPort: 8082 + protocol: TCP + serviceAccountName: centraldashboard diff --git a/tests/stacks/azure/application/centraldashboard/test_data/expected/networking.istio.io_v1alpha3_virtualservice_centraldashboard.yaml b/tests/stacks/azure/application/centraldashboard/test_data/expected/networking.istio.io_v1alpha3_virtualservice_centraldashboard.yaml new file mode 100644 index 000000000..dae2cb296 --- /dev/null +++ b/tests/stacks/azure/application/centraldashboard/test_data/expected/networking.istio.io_v1alpha3_virtualservice_centraldashboard.yaml @@ -0,0 +1,24 @@ +apiVersion: networking.istio.io/v1alpha3 +kind: VirtualService +metadata: + labels: + app.kubernetes.io/component: centraldashboard + app.kubernetes.io/name: centraldashboard + name: centraldashboard + namespace: kubeflow +spec: + gateways: + - kubeflow-gateway + hosts: + - '*' + http: + - match: + - uri: + prefix: / + rewrite: + uri: / + route: + - destination: + host: centraldashboard.$(namespace).svc.$(clusterDomain) + port: + number: 80 diff --git a/tests/stacks/azure/application/centraldashboard/test_data/expected/rbac.authorization.k8s.io_v1_clusterrole_centraldashboard.yaml b/tests/stacks/azure/application/centraldashboard/test_data/expected/rbac.authorization.k8s.io_v1_clusterrole_centraldashboard.yaml new file mode 100644 index 000000000..7491bff88 --- /dev/null +++ b/tests/stacks/azure/application/centraldashboard/test_data/expected/rbac.authorization.k8s.io_v1_clusterrole_centraldashboard.yaml @@ -0,0 +1,19 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app: centraldashboard + app.kubernetes.io/component: centraldashboard + app.kubernetes.io/name: centraldashboard + name: centraldashboard +rules: +- apiGroups: + - "" + resources: + - events + - namespaces + - nodes + verbs: + - get + - list + - watch diff --git a/tests/stacks/azure/application/centraldashboard/test_data/expected/rbac.authorization.k8s.io_v1_clusterrolebinding_centraldashboard.yaml b/tests/stacks/azure/application/centraldashboard/test_data/expected/rbac.authorization.k8s.io_v1_clusterrolebinding_centraldashboard.yaml new file mode 100644 index 000000000..d06cac3fd --- /dev/null +++ b/tests/stacks/azure/application/centraldashboard/test_data/expected/rbac.authorization.k8s.io_v1_clusterrolebinding_centraldashboard.yaml @@ -0,0 +1,16 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + labels: + app: centraldashboard + app.kubernetes.io/component: centraldashboard + app.kubernetes.io/name: centraldashboard + name: centraldashboard +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: centraldashboard +subjects: +- kind: ServiceAccount + name: centraldashboard + namespace: kubeflow diff --git a/tests/stacks/azure/application/centraldashboard/test_data/expected/rbac.authorization.k8s.io_v1_role_centraldashboard.yaml b/tests/stacks/azure/application/centraldashboard/test_data/expected/rbac.authorization.k8s.io_v1_role_centraldashboard.yaml new file mode 100644 index 000000000..8bd0261ab --- /dev/null +++ b/tests/stacks/azure/application/centraldashboard/test_data/expected/rbac.authorization.k8s.io_v1_role_centraldashboard.yaml @@ -0,0 +1,29 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + labels: + app: centraldashboard + app.kubernetes.io/component: centraldashboard + app.kubernetes.io/name: centraldashboard + name: centraldashboard + namespace: kubeflow +rules: +- apiGroups: + - "" + - app.k8s.io + resources: + - applications + - pods + - pods/exec + - pods/log + verbs: + - get + - list + - watch +- apiGroups: + - "" + resources: + - secrets + - configmaps + verbs: + - get diff --git a/tests/stacks/azure/application/centraldashboard/test_data/expected/rbac.authorization.k8s.io_v1_rolebinding_centraldashboard.yaml b/tests/stacks/azure/application/centraldashboard/test_data/expected/rbac.authorization.k8s.io_v1_rolebinding_centraldashboard.yaml new file mode 100644 index 000000000..c1c4c3079 --- /dev/null +++ b/tests/stacks/azure/application/centraldashboard/test_data/expected/rbac.authorization.k8s.io_v1_rolebinding_centraldashboard.yaml @@ -0,0 +1,17 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + labels: + app: centraldashboard + app.kubernetes.io/component: centraldashboard + app.kubernetes.io/name: centraldashboard + name: centraldashboard + namespace: kubeflow +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: centraldashboard +subjects: +- kind: ServiceAccount + name: centraldashboard + namespace: kubeflow diff --git a/tests/stacks/azure/application/centraldashboard/test_data/expected/~g_v1_configmap_centraldashboard-links-config.yaml b/tests/stacks/azure/application/centraldashboard/test_data/expected/~g_v1_configmap_centraldashboard-links-config.yaml new file mode 100644 index 000000000..41e1de552 --- /dev/null +++ b/tests/stacks/azure/application/centraldashboard/test_data/expected/~g_v1_configmap_centraldashboard-links-config.yaml @@ -0,0 +1,71 @@ +apiVersion: v1 +data: + links: |- + { + "menuLinks": [ + { + "link": "/pipeline/", + "text": "Pipelines" + }, + { + "link": "/jupyter/", + "text": "Notebook Servers" + }, + { + "link": "/katib/", + "text": "Katib" + } + ], + "externalLinks": [], + "quickLinks": [ + { + "text": "Upload a pipeline", + "desc": "Pipelines", + "link": "/pipeline/" + }, + { + "text": "View all pipeline runs", + "desc": "Pipelines", + "link": "/pipeline/#/runs" + }, + { + "text": "Create a new Notebook server", + "desc": "Notebook Servers", + "link": "/jupyter/new?namespace=kubeflow" + }, + { + "text": "View Katib Experiments", + "desc": "Katib", + "link": "/katib/" + } + ], + "documentationItems": [ + { + "text": "Kubeflow Overview", + "desc": "An overview of Kubeflow architecture and workflows", + "link": "https://www.kubeflow.org/docs/started/kubeflow-overview/" + }, + { + "text": "Kubeflow on Azure", + "desc": "Running Kubeflow on AKS and Microsoft Azure", + "link": "https://www.kubeflow.org/docs/azure/" + }, + { + "text": "Azure Machine Learning Docs", + "desc": "Azure Machine Learning Documentation", + "link": "https://aka.ms/kubeflow-azureml-docs" + }, + { + "text": "Azure Kubernetes Service Docs", + "desc": "Azure Kubernetes Service Documentation", + "link": "https://aka.ms/kubeflow-aks-docs" + }, + ] + } +kind: ConfigMap +metadata: + labels: + app.kubernetes.io/component: centraldashboard + app.kubernetes.io/name: centraldashboard + name: centraldashboard-links-config + namespace: kubeflow diff --git a/tests/stacks/azure/application/centraldashboard/test_data/expected/~g_v1_service_centraldashboard.yaml b/tests/stacks/azure/application/centraldashboard/test_data/expected/~g_v1_service_centraldashboard.yaml new file mode 100644 index 000000000..3f50af45e --- /dev/null +++ b/tests/stacks/azure/application/centraldashboard/test_data/expected/~g_v1_service_centraldashboard.yaml @@ -0,0 +1,29 @@ +apiVersion: v1 +kind: Service +metadata: + annotations: + getambassador.io/config: |- + --- + apiVersion: ambassador/v0 + kind: Mapping + name: centralui-mapping + prefix: / + rewrite: / + service: centraldashboard.$(namespace) + labels: + app: centraldashboard + app.kubernetes.io/component: centraldashboard + app.kubernetes.io/name: centraldashboard + name: centraldashboard + namespace: kubeflow +spec: + ports: + - port: 80 + protocol: TCP + targetPort: 8082 + selector: + app: centraldashboard + app.kubernetes.io/component: centraldashboard + app.kubernetes.io/name: centraldashboard + sessionAffinity: None + type: ClusterIP diff --git a/tests/stacks/azure/application/centraldashboard/test_data/expected/~g_v1_serviceaccount_centraldashboard.yaml b/tests/stacks/azure/application/centraldashboard/test_data/expected/~g_v1_serviceaccount_centraldashboard.yaml new file mode 100644 index 000000000..55deba785 --- /dev/null +++ b/tests/stacks/azure/application/centraldashboard/test_data/expected/~g_v1_serviceaccount_centraldashboard.yaml @@ -0,0 +1,8 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + labels: + app.kubernetes.io/component: centraldashboard + app.kubernetes.io/name: centraldashboard + name: centraldashboard + namespace: kubeflow diff --git a/tests/stacks/azure/application/jupyter-web-app/base/test_data/expected/apps_v1_deployment_jupyter-web-app-deployment.yaml b/tests/stacks/azure/application/jupyter-web-app/base/test_data/expected/apps_v1_deployment_jupyter-web-app-deployment.yaml index 7c172e2e6..26a6c388d 100644 --- a/tests/stacks/azure/application/jupyter-web-app/base/test_data/expected/apps_v1_deployment_jupyter-web-app-deployment.yaml +++ b/tests/stacks/azure/application/jupyter-web-app/base/test_data/expected/apps_v1_deployment_jupyter-web-app-deployment.yaml @@ -48,7 +48,7 @@ spec: configMapKeyRef: key: userid-prefix name: kubeflow-config - image: gcr.io/kubeflow-images-public/jupyter-web-app:vmaster-gd9be4b9e + image: gcr.io/kubeflow-images-public/jupyter-web-app:vmaster-g845af298 imagePullPolicy: Always name: jupyter-web-app ports: diff --git a/tests/stacks/azure/application/jupyter-web-app/test_data/expected/apps_v1_deployment_jupyter-web-app-deployment.yaml b/tests/stacks/azure/application/jupyter-web-app/test_data/expected/apps_v1_deployment_jupyter-web-app-deployment.yaml index 7c172e2e6..26a6c388d 100644 --- a/tests/stacks/azure/application/jupyter-web-app/test_data/expected/apps_v1_deployment_jupyter-web-app-deployment.yaml +++ b/tests/stacks/azure/application/jupyter-web-app/test_data/expected/apps_v1_deployment_jupyter-web-app-deployment.yaml @@ -48,7 +48,7 @@ spec: configMapKeyRef: key: userid-prefix name: kubeflow-config - image: gcr.io/kubeflow-images-public/jupyter-web-app:vmaster-gd9be4b9e + image: gcr.io/kubeflow-images-public/jupyter-web-app:vmaster-g845af298 imagePullPolicy: Always name: jupyter-web-app ports: diff --git a/tests/stacks/azure/test_data/expected/apps_v1_deployment_jupyter-web-app-deployment.yaml b/tests/stacks/azure/test_data/expected/apps_v1_deployment_jupyter-web-app-deployment.yaml index 591a96acb..672fded65 100644 --- a/tests/stacks/azure/test_data/expected/apps_v1_deployment_jupyter-web-app-deployment.yaml +++ b/tests/stacks/azure/test_data/expected/apps_v1_deployment_jupyter-web-app-deployment.yaml @@ -48,7 +48,7 @@ spec: configMapKeyRef: key: userid-prefix name: kubeflow-config-bk4bc7m928 - image: gcr.io/kubeflow-images-public/jupyter-web-app:vmaster-gd9be4b9e + image: gcr.io/kubeflow-images-public/jupyter-web-app:vmaster-g845af298 imagePullPolicy: Always name: jupyter-web-app ports: diff --git a/tests/stacks/azure/test_data/expected/~g_v1_configmap_centraldashboard-links-config.yaml b/tests/stacks/azure/test_data/expected/~g_v1_configmap_centraldashboard-links-config.yaml index 40a289bfe..41e1de552 100644 --- a/tests/stacks/azure/test_data/expected/~g_v1_configmap_centraldashboard-links-config.yaml +++ b/tests/stacks/azure/test_data/expected/~g_v1_configmap_centraldashboard-links-config.yaml @@ -41,40 +41,25 @@ data: ], "documentationItems": [ { - "text": "Getting Started with Kubeflow", - "desc": "Get your machine-learning workflow up and running on Kubeflow", - "link": "https://www.kubeflow.org/docs/started/getting-started/" + "text": "Kubeflow Overview", + "desc": "An overview of Kubeflow architecture and workflows", + "link": "https://www.kubeflow.org/docs/started/kubeflow-overview/" }, { - "text": "MiniKF", - "desc": "A fast and easy way to deploy Kubeflow locally", - "link": "https://www.kubeflow.org/docs/started/getting-started-minikf/" + "text": "Kubeflow on Azure", + "desc": "Running Kubeflow on AKS and Microsoft Azure", + "link": "https://www.kubeflow.org/docs/azure/" }, { - "text": "Microk8s for Kubeflow", - "desc": "Quickly get Kubeflow running locally on native hypervisors", - "link": "https://www.kubeflow.org/docs/started/getting-started-multipass/" + "text": "Azure Machine Learning Docs", + "desc": "Azure Machine Learning Documentation", + "link": "https://aka.ms/kubeflow-azureml-docs" }, { - "text": "Minikube for Kubeflow", - "desc": "Quickly get Kubeflow running locally", - "link": "https://www.kubeflow.org/docs/started/getting-started-minikube/" + "text": "Azure Kubernetes Service Docs", + "desc": "Azure Kubernetes Service Documentation", + "link": "https://aka.ms/kubeflow-aks-docs" }, - { - "text": "Kubeflow on GCP", - "desc": "Running Kubeflow on Kubernetes Engine and Google Cloud Platform", - "link": "https://www.kubeflow.org/docs/gke/" - }, - { - "text": "Kubeflow on AWS", - "desc": "Running Kubeflow on Elastic Container Service and Amazon Web Services", - "link": "https://www.kubeflow.org/docs/aws/" - }, - { - "text": "Requirements for Kubeflow", - "desc": "Get more detailed information about using Kubeflow and its components", - "link": "https://www.kubeflow.org/docs/started/requirements/" - } ] } kind: ConfigMap