From aceaee5c170555d2e48b5d70ee2d8339c075248e Mon Sep 17 00:00:00 2001 From: Shu Muto Date: Sat, 23 Mar 2024 18:54:04 +0900 Subject: [PATCH] Clean up unused sources --- hack/develop/run-dev-container.sh | 13 -- hack/test-resources/cluster-admin.yaml | 174 ------------------------- 2 files changed, 187 deletions(-) delete mode 100644 hack/test-resources/cluster-admin.yaml diff --git a/hack/develop/run-dev-container.sh b/hack/develop/run-dev-container.sh index cf03804db430..0298eefbc32a 100755 --- a/hack/develop/run-dev-container.sh +++ b/hack/develop/run-dev-container.sh @@ -23,19 +23,6 @@ LOCAL_UID=$(id -u) LOCAL_GID=$(id -g) DOCKER_GID=$(getent group docker|cut -d ":" -f 3) -# kubeconfig for dashboard. -# This will be mounted and certain npm command can modify it, -# so this should not be set for original kubeconfig. -#if [[ -n "${KD_DEV_KUBECONFIG}" ]] ; then - # Use your own kubernetes cluster. - #K8S_OWN_CLUSTER=true -#else - # Use the kind cluster that will be created later by the script. - # Set defult as kubeconfig made by `hack/scripts/start-cluster.sh`. - #touch /tmp/kind.kubeconfig - #KD_DEV_KUBECONFIG=/tmp/kind.kubeconfig -#fi - # Create docker network to work with kind cluster KD_DEV_NETWORK="kubernetes-dashboard" docker network create ${KD_DEV_NETWORK} \ diff --git a/hack/test-resources/cluster-admin.yaml b/hack/test-resources/cluster-admin.yaml deleted file mode 100644 index f9304f34e624..000000000000 --- a/hack/test-resources/cluster-admin.yaml +++ /dev/null @@ -1,174 +0,0 @@ -# Copyright 2017 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# ClusterRole and Role for testing and developing Kubernetes Dashboard - -################################ -### Namespaces -################################ - -apiVersion: v1 -kind: Namespace -metadata: - name: kubernetes-dashboard - labels: - app.kubernetes.io/part-of: kubernetes-dashboard - ---- - -################################ -### cert-manager -################################ - -apiVersion: cert-manager.io/v1 -kind: Issuer -metadata: - name: selfsigned - namespace: kubernetes-dashboard - labels: - app.kubernetes.io/name: certmanager - app.kubernetes.io/part-of: kubernetes-dashboard -spec: - selfSigned: {} - ---- - -################################ -### Service Accounts -################################ - -apiVersion: v1 -kind: ServiceAccount -metadata: - name: kubernetes-dashboard - namespace: kubernetes-dashboard - labels: - app.kubernetes.io/part-of: kubernetes-dashboard - ---- - -################################ -### Secrets & Config Maps -################################ - -apiVersion: v1 -kind: Secret -metadata: - name: kubernetes-dashboard-csrf - namespace: kubernetes-dashboard - labels: - app.kubernetes.io/part-of: kubernetes-dashboard -type: Opaque -data: - csrf: "" - ---- - -apiVersion: v1 -kind: Secret -metadata: - name: kubernetes-dashboard-key-holder - namespace: kubernetes-dashboard - labels: - app.kubernetes.io/part-of: kubernetes-dashboard -type: Opaque - ---- - -kind: ConfigMap -apiVersion: v1 -metadata: - name: kubernetes-dashboard-settings - namespace: kubernetes-dashboard - labels: - app.kubernetes.io/part-of: kubernetes-dashboard - ---- - -################################ -### Roles & Bindings -################################ - -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: kubernetes-dashboard - namespace: kubernetes-dashboard - labels: - app.kubernetes.io/part-of: kubernetes-dashboard -rules: - # Allow Dashboard to get, update and delete Dashboard exclusive secrets. - - apiGroups: [ "" ] - resources: [ "secrets" ] - resourceNames: [ "kubernetes-dashboard-key-holder", "kubernetes-dashboard-csrf" ] - verbs: [ "get", "update", "delete" ] - # Allow Dashboard to get and update 'kubernetes-dashboard-settings' config map. - - apiGroups: [ "" ] - resources: [ "configmaps" ] - resourceNames: [ "kubernetes-dashboard-settings" ] - verbs: [ "get", "update" ] - # Allow Dashboard to get metrics. - - apiGroups: [ "" ] - resources: [ "services/proxy" ] - resourceNames: [ "kubernetes-dashboard-metrics-scraper", "http:kubernetes-dashboard-metrics-scraper" ] - verbs: [ "get" ] - ---- - -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: kubernetes-dashboard - labels: - app.kubernetes.io/part-of: kubernetes-dashboard -rules: - # Allow Metrics Scraper to get metrics from the Metrics server - - apiGroups: [ "metrics.k8s.io" ] - resources: [ "pods", "nodes" ] - verbs: [ "get", "list", "watch" ] - ---- - -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: kubernetes-dashboard - namespace: kubernetes-dashboard - labels: - app.kubernetes.io/part-of: kubernetes-dashboard -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: kubernetes-dashboard -subjects: - - kind: ServiceAccount - name: kubernetes-dashboard - namespace: kubernetes-dashboard - ---- - -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: kubernetes-dashboard - labels: - app.kubernetes.io/part-of: kubernetes-dashboard -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: cluster-admin -subjects: - - kind: ServiceAccount - name: kubernetes-dashboard - namespace: kubernetes-dashboard