Skip to content

Commit

Permalink
Change dashboard api group to elasticsearch (#794)
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <tamal@appscode.com>
  • Loading branch information
tamalsaha committed Jan 17, 2024
1 parent 625cc6e commit eafb83d
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 28 deletions.
12 changes: 4 additions & 8 deletions charts/kubedb-dashboard/templates/cluster-role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ rules:
- customresourcedefinitions
verbs: ["*"]
- apiGroups:
- dashboard.kubedb.com
- elasticsearch.kubedb.com
resources:
- elasticsearchdashboards
verbs: ["create", "delete", "get", "list" , "patch", "update", "watch"]
- apiGroups:
- dashboard.kubedb.com
- elasticsearch.kubedb.com
resources:
- elasticsearchdashboards/status
verbs: ["get"]
- apiGroups:
- dashboard.kubedb.com
- elasticsearch.kubedb.com
resources:
- elasticsearchdashboards/finalizers
verbs: ["update"]
Expand Down Expand Up @@ -49,14 +49,10 @@ rules:
- ""
resources:
- services
verbs: [ "create", "delete", "get", "list" , "patch", "update", "watch"]
- apiGroups:
- ""
resources:
- secrets
verbs: [ "create", "delete", "get", "list" , "patch", "update", "watch"]
- apiGroups:
- dashboard.kubedb.com
- elasticsearch.kubedb.com
resources:
- elasticsearchdashboards/status
verbs: ["get" , "patch" , "update"]
Expand Down
6 changes: 3 additions & 3 deletions charts/kubedb-dashboard/templates/user-roles.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ metadata:
"helm.sh/hook-delete-policy": before-hook-creation
rules:
- apiGroups:
- dashboard.kubedb.com
- elasticsearch.kubedb.com
resources:
- "*"
verbs: ["*"]
Expand All @@ -25,7 +25,7 @@ metadata:
"helm.sh/hook-delete-policy": before-hook-creation
rules:
- apiGroups:
- dashboard.kubedb.com
- elasticsearch.kubedb.com
resources:
- "*"
verbs: ["create", "get", "list", "watch", "update", "patch"]
Expand All @@ -41,7 +41,7 @@ metadata:
"helm.sh/hook-delete-policy": before-hook-creation
rules:
- apiGroups:
- dashboard.kubedb.com
- elasticsearch.kubedb.com
resources:
- "*"
verbs: ["get", "list", "watch"]
19 changes: 15 additions & 4 deletions charts/kubedb-provisioner/templates/cluster-role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ rules:
resources:
- services
- secrets
verbs: ["create", "delete", "get", "patch", "list", "watch"]
verbs: ["create", "delete", "get", "patch", "update", "list", "watch"]
- apiGroups:
- ""
resources:
Expand Down Expand Up @@ -82,12 +82,13 @@ rules:
verbs: ["get", "list", "watch"]
- apiGroups:
- kubedb.com
- catalog.kubedb.com
- archiver.kubedb.com
- apps.k8s.appscode.com
- archiver.kubedb.com
- catalog.kubedb.com
- core.kubestash.com
- storage.kubestash.com
- elasticsearch.kubedb.com
- kafka.kubedb.com
- storage.kubestash.com
resources:
- "*"
verbs: ["*"]
Expand All @@ -107,6 +108,16 @@ rules:
- redises/finalizers
- redissentinels/finalizers
verbs: ["update"]
- apiGroups:
- elasticsearch.kubedb.com
resources:
- elasticsearchdashboards/status
verbs: ["get"]
- apiGroups:
- elasticsearch.kubedb.com
resources:
- elasticsearchdashboards/finalizers
verbs: ["update"]
- apiGroups:
- apps
resources:
Expand Down
8 changes: 4 additions & 4 deletions charts/kubedb-webhook-server/templates/apiregistration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -198,12 +198,12 @@ spec:
apiVersion: apiregistration.k8s.io/v1
kind: APIService
metadata:
name: v1alpha1.validators.dashboard.kubedb.com
name: v1alpha1.validators.elasticsearch.kubedb.com
labels:
app.kubernetes.io/component: kubedb-dashboard
{{- include "kubedb-webhook-server.labels" . | nindent 4 }}
spec:
group: validators.dashboard.kubedb.com
group: validators.elasticsearch.kubedb.com
version: v1alpha1
service:
namespace: {{ .Release.Namespace }}
Expand All @@ -215,12 +215,12 @@ spec:
apiVersion: apiregistration.k8s.io/v1
kind: APIService
metadata:
name: v1alpha1.mutators.dashboard.kubedb.com
name: v1alpha1.mutators.elasticsearch.kubedb.com
labels:
app.kubernetes.io/component: kubedb-dashboard
{{- include "kubedb-webhook-server.labels" . | nindent 4 }}
spec:
group: mutators.dashboard.kubedb.com
group: mutators.elasticsearch.kubedb.com
version: v1alpha1
service:
namespace: {{ .Release.Namespace }}
Expand Down
2 changes: 1 addition & 1 deletion charts/kubedb-webhook-server/templates/cluster-role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ rules:
- ops.kubedb.com
- postgres.kubedb.com
- autoscaling.kubedb.com
- dashboard.kubedb.com
- elasticsearch.kubedb.com
- schema.kubedb.com
- archiver.kubedb.com
- kafka.kubedb.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,21 @@
apiVersion: admissionregistration.k8s.io/v1
kind: MutatingWebhookConfiguration
metadata:
name: mutators.dashboard.kubedb.com
name: mutators.elasticsearch.kubedb.com
labels:
app.kubernetes.io/component: kubedb-dashboard
{{- include "kubedb-webhook-server.labels" . | nindent 4 }}
webhooks:
{{- if $featureGates.Elasticsearch }}
- name: elasticsearchdashboardwebhook.mutators.dashboard.kubedb.com
- name: elasticsearchdashboardwebhook.mutators.elasticsearch.kubedb.com
clientConfig:
service:
namespace: default
name: kubernetes
path: /apis/mutators.dashboard.kubedb.com/v1alpha1/elasticsearchdashboardwebhooks
path: /apis/mutators.elasticsearch.kubedb.com/v1alpha1/elasticsearchdashboardwebhooks
caBundle: {{ $caCrt }}
rules:
- apiGroups: ["dashboard.kubedb.com"]
- apiGroups: ["elasticsearch.kubedb.com"]
apiVersions: ["*"]
resources: ["elasticsearchdashboards"]
operations: ["CREATE", "UPDATE"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,21 @@
apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
metadata:
name: validators.dashboard.kubedb.com
name: validators.elasticsearch.kubedb.com
labels:
app.kubernetes.io/component: kubedb-dashboard
{{- include "kubedb-webhook-server.labels" . | nindent 4 }}
webhooks:
{{- if $featureGates.Elasticsearch }}
- name: elasticsearchdashboardwebhook.validators.dashboard.kubedb.com
- name: elasticsearchdashboardwebhook.validators.elasticsearch.kubedb.com
clientConfig:
service:
namespace: default
name: kubernetes
path: /apis/validators.dashboard.kubedb.com/v1alpha1/elasticsearchdashboardwebhooks
path: /apis/validators.elasticsearch.kubedb.com/v1alpha1/elasticsearchdashboardwebhooks
caBundle: {{ $caCrt }}
rules:
- apiGroups: ["dashboard.kubedb.com"]
- apiGroups: ["elasticsearch.kubedb.com"]
apiVersions: ["*"]
resources: ["elasticsearchdashboards"]
operations: ["CREATE", "UPDATE", "DELETE"]
Expand Down

0 comments on commit eafb83d

Please sign in to comment.