From 27df92b9eef4e5d9afb6db42018655b440d7bcad Mon Sep 17 00:00:00 2001 From: whg517 Date: Fri, 15 Nov 2024 15:12:41 +0800 Subject: [PATCH] feat(examples): add a simple usage for operator --- examples/simple-hive-cluster-postgres-s3.yaml | 66 +++++++++++++++++++ examples/simple-hive-cluster.yaml | 34 ++++++++++ 2 files changed, 100 insertions(+) create mode 100644 examples/simple-hive-cluster-postgres-s3.yaml create mode 100644 examples/simple-hive-cluster.yaml diff --git a/examples/simple-hive-cluster-postgres-s3.yaml b/examples/simple-hive-cluster-postgres-s3.yaml new file mode 100644 index 0000000..a82e2ba --- /dev/null +++ b/examples/simple-hive-cluster-postgres-s3.yaml @@ -0,0 +1,66 @@ +# helm install secret-operator \ +# secret-operator \ +# --repo https://zncdatadev.github.io/kubedoop-helm-charts/ +# helm install minio \ +# minio \ +# --repo https://charts.bitnami.com/bitnami \ +# --set auth.rootUser=minio-access-key \ +# --set auth.rootPassword=minio-secret-key +# helm install hive bitnami/postgresql --version=12.1.5 \ +# --set postgresqlUsername=hive \ +# --set postgresqlPassword=hive \ +# --set postgresqlDatabase=hive +--- +apiVersion: hive.kubedoop.dev/v1alpha1 +kind: HiveCluster +metadata: + name: simple-hive-postgres +spec: + image: + productVersion: 4.0.0 + stackableVersion: 0.0.0-dev + clusterConfig: + database: + connString: jdbc:derby:;databaseName=/tmp/hive;create=true + credentialsSecret: hive-credentials + dbType: derby + s3: + inline: + host: test-minio + port: 9000 + accessStyle: Path + credentials: + secretClass: simple-hive-s3-secret-class + metastore: + roleGroups: + default: + replicas: 1 +--- +apiVersion: secrets.kubedoop.dev/v1alpha1 +kind: SecretClass +metadata: + name: simple-hive-s3-secret-class +spec: + backend: + k8sSearch: + searchNamespace: + pod: {} +--- +apiVersion: v1 +kind: Secret +metadata: + name: simple-hive-s3-secret + labels: + secrets.kubedoop.dev/class: simple-hive-s3-secret-class +stringData: + accessKey: minio-access-key + secretKey: minio-secret-key +--- +apiVersion: v1 +kind: Secret +metadata: + name: hive-credentials +type: Opaque +stringData: + username: APP + password: mine diff --git a/examples/simple-hive-cluster.yaml b/examples/simple-hive-cluster.yaml new file mode 100644 index 0000000..4e7612c --- /dev/null +++ b/examples/simple-hive-cluster.yaml @@ -0,0 +1,34 @@ +--- +apiVersion: hive.kubedoop.dev/v1alpha1 +kind: HiveCluster +metadata: + name: simple-hive-derby +spec: + image: + productVersion: 4.0.0 + stackableVersion: 0.0.0-dev + clusterConfig: + database: + connString: jdbc:derby:;databaseName=/tmp/hive;create=true + credentialsSecret: hive-credentials + dbType: derby + metastore: + roleGroups: + default: + replicas: 1 + config: + resources: + cpu: + min: 300m + max: "2" + memory: + limit: 5Gi +--- +apiVersion: v1 +kind: Secret +metadata: + name: hive-credentials +type: Opaque +stringData: + username: APP + password: mine