-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(clickhousegrant): escape role name
- Loading branch information
Showing
7 changed files
with
356 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
apiVersion: aiven.io/v1alpha1 | ||
kind: ClickhouseGrant | ||
metadata: | ||
name: test-grant | ||
spec: | ||
authSecretRef: | ||
name: aiven-token | ||
key: token | ||
|
||
project: aiven-ci-kubernetes-operator | ||
serviceName: clickhouse-227c6ab5 | ||
|
||
privilegeGrants: | ||
- database: clickhouse-db | ||
grantees: | ||
- role: writer | ||
privileges: | ||
- INSERT | ||
- SELECT | ||
- CREATE TABLE | ||
- CREATE VIEW | ||
roleGrants: | ||
- grantees: | ||
- user: clickhouse-user | ||
roles: | ||
- writer | ||
--- | ||
apiVersion: aiven.io/v1alpha1 | ||
kind: ClickhouseDatabase | ||
metadata: | ||
name: clickhouse-db | ||
spec: | ||
authSecretRef: | ||
name: aiven-token | ||
key: token | ||
|
||
project: aiven-ci-kubernetes-operator | ||
serviceName: clickhouse-227c6ab5 | ||
--- | ||
apiVersion: aiven.io/v1alpha1 | ||
kind: ClickhouseUser | ||
metadata: | ||
name: clickhouse-user | ||
spec: | ||
authSecretRef: | ||
name: aiven-token | ||
key: token | ||
|
||
project: aiven-ci-kubernetes-operator | ||
serviceName: clickhouse-227c6ab5 | ||
--- | ||
apiVersion: aiven.io/v1alpha1 | ||
kind: ClickhouseRole | ||
metadata: | ||
name: writer | ||
spec: | ||
authSecretRef: | ||
name: aiven-token | ||
key: token | ||
|
||
project: aiven-ci-kubernetes-operator | ||
serviceName: clickhouse-227c6ab5 | ||
role: writer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
docs/docs/api-reference/examples/clickhousegrant.example_2.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
|
||
apiVersion: aiven.io/v1alpha1 | ||
kind: ClickhouseGrant | ||
metadata: | ||
name: demo-ch-grant | ||
spec: | ||
authSecretRef: | ||
name: aiven-token | ||
key: token | ||
|
||
project: my-aiven-project | ||
serviceName: my-clickhouse | ||
|
||
privilegeGrants: | ||
- grantees: | ||
- user: user1 | ||
- user: my-clickhouse-user-🦄 | ||
privileges: | ||
- SELECT | ||
- INSERT | ||
database: my-db | ||
# If table is omitted, the privileges are granted on all tables in the database | ||
# If columns is omitted, the privileges are granted on all columns in the table | ||
- grantees: | ||
- role: my-role | ||
privileges: | ||
- SELECT | ||
database: my-db | ||
table: my-table | ||
columns: | ||
- col1 | ||
- col2 | ||
|
||
roleGrants: | ||
- roles: | ||
- other-role | ||
grantees: | ||
- user: my-user | ||
- role: my-role | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,84 @@ | ||
|
||
apiVersion: aiven.io/v1alpha1 | ||
kind: ClickhouseGrant | ||
metadata: | ||
name: demo-ch-grant | ||
name: my-clickhouse-grant | ||
spec: | ||
authSecretRef: | ||
name: aiven-token | ||
key: token | ||
|
||
project: my-aiven-project | ||
serviceName: my-clickhouse | ||
project: aiven-project-name | ||
serviceName: my-clickhouse-service | ||
|
||
privilegeGrants: | ||
- grantees: | ||
- user: user1 | ||
- user: my-clickhouse-user-🦄 | ||
- role: my-clickhouse-role | ||
privileges: | ||
- SELECT | ||
- INSERT | ||
database: my-db | ||
# If table is omitted, the privileges are granted on all tables in the database | ||
# If columns is omitted, the privileges are granted on all columns in the table | ||
- grantees: | ||
- role: my-role | ||
privileges: | ||
- SELECT | ||
database: my-db | ||
table: my-table | ||
columns: | ||
- col1 | ||
- col2 | ||
|
||
- CREATE TABLE | ||
- CREATE VIEW | ||
database: my-clickhouse-db | ||
roleGrants: | ||
- roles: | ||
- other-role | ||
grantees: | ||
- user: my-user | ||
- role: my-role | ||
- grantees: | ||
- user: my-clickhouse-user | ||
roles: | ||
- my-clickhouse-role | ||
|
||
--- | ||
|
||
apiVersion: aiven.io/v1alpha1 | ||
kind: Clickhouse | ||
metadata: | ||
name: my-clickhouse-service | ||
spec: | ||
authSecretRef: | ||
name: aiven-token | ||
key: token | ||
|
||
project: aiven-project-name | ||
cloudName: google-europe-west1 | ||
plan: startup-16 | ||
|
||
--- | ||
|
||
apiVersion: aiven.io/v1alpha1 | ||
kind: ClickhouseDatabase | ||
metadata: | ||
name: my-clickhouse-db | ||
spec: | ||
authSecretRef: | ||
name: aiven-token | ||
key: token | ||
|
||
project: aiven-project-name | ||
serviceName: my-clickhouse-service | ||
|
||
--- | ||
|
||
apiVersion: aiven.io/v1alpha1 | ||
kind: ClickhouseUser | ||
metadata: | ||
name: my-clickhouse-user | ||
spec: | ||
authSecretRef: | ||
name: aiven-token | ||
key: token | ||
|
||
project: aiven-project-name | ||
serviceName: my-clickhouse-service | ||
|
||
--- | ||
|
||
apiVersion: aiven.io/v1alpha1 | ||
kind: ClickhouseRole | ||
metadata: | ||
name: my-clickhouse-role | ||
spec: | ||
authSecretRef: | ||
name: aiven-token | ||
key: token | ||
|
||
project: aiven-project-name | ||
serviceName: my-clickhouse-service | ||
role: my-clickhouse-role |
Oops, something went wrong.