From da027d9384c47d9d0342d55c37646373a05ca881 Mon Sep 17 00:00:00 2001 From: Murad Biashimov Date: Mon, 8 Jul 2024 14:41:50 +0200 Subject: [PATCH] docs(clickhousegrant): warn grant syntax ambiguity (#784) --- api/v1alpha1/clickhousegrant_types.go | 1 + .../templates/aiven.io_clickhousegrants.yaml | 4 +++- config/crd/bases/aiven.io_clickhousegrants.yaml | 4 +++- docs/docs/api-reference/clickhousegrant.md | 6 +++++- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/api/v1alpha1/clickhousegrant_types.go b/api/v1alpha1/clickhousegrant_types.go index f8f81c9f..f1515a87 100644 --- a/api/v1alpha1/clickhousegrant_types.go +++ b/api/v1alpha1/clickhousegrant_types.go @@ -78,6 +78,7 @@ type ClickhouseGrantStatus struct { //+kubebuilder:subresource:status // ClickhouseGrant is the Schema for the ClickhouseGrants API +// Warning "Ambiguity in the `GRANT` syntax": Due to [an ambiguity](https://github.com/aiven/ospo-tracker/issues/350) in the `GRANT` syntax in Clickhouse, you should not have users and roles with the same name. It is not clear if a grant refers to the user or the role. // +kubebuilder:printcolumn:name="Project",type="string",JSONPath=".spec.project" // +kubebuilder:printcolumn:name="Service Name",type="string",JSONPath=".spec.serviceName" type ClickhouseGrant struct { diff --git a/charts/aiven-operator-crds/templates/aiven.io_clickhousegrants.yaml b/charts/aiven-operator-crds/templates/aiven.io_clickhousegrants.yaml index c8641b6f..d5218d63 100644 --- a/charts/aiven-operator-crds/templates/aiven.io_clickhousegrants.yaml +++ b/charts/aiven-operator-crds/templates/aiven.io_clickhousegrants.yaml @@ -24,7 +24,9 @@ spec: name: v1alpha1 schema: openAPIV3Schema: - description: ClickhouseGrant is the Schema for the ClickhouseGrants API + description: |- + ClickhouseGrant is the Schema for the ClickhouseGrants API + Warning "Ambiguity in the `GRANT` syntax": Due to [an ambiguity](https://github.com/aiven/ospo-tracker/issues/350) in the `GRANT` syntax in Clickhouse, you should not have users and roles with the same name. It is not clear if a grant refers to the user or the role. properties: apiVersion: description: |- diff --git a/config/crd/bases/aiven.io_clickhousegrants.yaml b/config/crd/bases/aiven.io_clickhousegrants.yaml index c8641b6f..d5218d63 100644 --- a/config/crd/bases/aiven.io_clickhousegrants.yaml +++ b/config/crd/bases/aiven.io_clickhousegrants.yaml @@ -24,7 +24,9 @@ spec: name: v1alpha1 schema: openAPIV3Schema: - description: ClickhouseGrant is the Schema for the ClickhouseGrants API + description: |- + ClickhouseGrant is the Schema for the ClickhouseGrants API + Warning "Ambiguity in the `GRANT` syntax": Due to [an ambiguity](https://github.com/aiven/ospo-tracker/issues/350) in the `GRANT` syntax in Clickhouse, you should not have users and roles with the same name. It is not clear if a grant refers to the user or the role. properties: apiVersion: description: |- diff --git a/docs/docs/api-reference/clickhousegrant.md b/docs/docs/api-reference/clickhousegrant.md index 8203a309..d4d1c9bc 100644 --- a/docs/docs/api-reference/clickhousegrant.md +++ b/docs/docs/api-reference/clickhousegrant.md @@ -69,7 +69,11 @@ demo-ch-grant my-aiven-project my-clickhouse ## ClickhouseGrant {: #ClickhouseGrant } -ClickhouseGrant is the Schema for the ClickhouseGrants API. +ClickhouseGrant is the Schema for the ClickhouseGrants API + +!!! Warning "Ambiguity in the `GRANT` syntax" + + Due to [an ambiguity](https://github.com/aiven/ospo-tracker/issues/350) in the `GRANT` syntax in Clickhouse, you should not have users and roles with the same name. It is not clear if a grant refers to the user or the role. **Required**