diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 5eb5076..c8573bd 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -28,14 +28,14 @@ jobs: with: wait: 120s - - name: Deploy greptimedb-cluster chart + - name: Deploy greptimedb-cluster if: ${{ github.event.inputs.chart == 'greptimedb-cluster' }} shell: bash run: | - ./scripts/deploy-greptimedb-cluster.sh + make e2e-greptimedb-cluster - - name: Deploy greptimedb-standalone chart + - name: Deploy greptimedb-standalone if: ${{ github.event.inputs.chart == 'greptimedb-standalone' }} shell: bash run: | - ./scripts/deploy-greptimedb-standalone.sh + make e2e-greptimedb-standalone diff --git a/Makefile b/Makefile index 5e3b62a..4f2bbab 100644 --- a/Makefile +++ b/Makefile @@ -23,10 +23,18 @@ check-docs: docs ## Check docs (echo "Need to update documentation, please run 'make docs'"; \ exit 1) +.PHONY: e2e-greptimedb-cluster +e2e-greptimedb-cluster: ## Run greptimedb-cluster e2e tests + ./scripts/e2e/greptimedb-cluster.sh + +.PHONY: e2e-greptimedb-standalone +e2e-greptimedb-standalone: ## Run greptimedb-standalone e2e tests + ./scripts/e2e/greptimedb-standalone.sh + .PHONY: e2e e2e: ## Run e2e tests - ./scripts/deploy-greptimedb-cluster.sh - ./scripts/deploy-greptimedb-standalone.sh + ./scripts/e2e/greptimedb-cluster.sh + ./scripts/e2e/greptimedb-standalone.sh .PHONY: update-crds update-crds: ## Run update crd @@ -45,7 +53,7 @@ check-crds: update-crds ## Check crd # For example: make update-chart CHART=${CHART_NAME} VERSION=${IMAGE_TAG} # make update-chart CHART=greptimedb-standalone VERSION=v0.7.2 # make update-chart CHART=greptimedb-cluster VERSION=v0.7.2 -# make update-chart CHART=greptimedb-operator VERSION=0.1.0-alpha.23 # [the greptimedb-operator image tag not have 'v' prefix] +# make update-chart CHART=greptimedb-operator VERSION=v0.1.0-alpha.28 .PHONY: update-chart update-chart: ## Run update chart ./scripts/update-chart.sh $(CHART) $(VERSION) diff --git a/charts/greptimedb-operator/Chart.yaml b/charts/greptimedb-operator/Chart.yaml index ce23972..7c6bfb7 100644 --- a/charts/greptimedb-operator/Chart.yaml +++ b/charts/greptimedb-operator/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 kubeVersion: ">=1.18.0-0" description: The greptimedb-operator Helm chart for Kubernetes. name: greptimedb-operator -appVersion: 0.1.0-alpha.28 -version: 0.2.1 +appVersion: 0.1.0-alpha.29 +version: 0.2.2 type: application home: https://github.com/GreptimeTeam/greptimedb-operator sources: diff --git a/charts/greptimedb-operator/README.md b/charts/greptimedb-operator/README.md index 6dec99b..248373a 100644 --- a/charts/greptimedb-operator/README.md +++ b/charts/greptimedb-operator/README.md @@ -2,7 +2,7 @@ The greptimedb-operator Helm chart for Kubernetes. -![Version: 0.2.1](https://img.shields.io/badge/Version-0.2.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.0-alpha.28](https://img.shields.io/badge/AppVersion-0.1.0--alpha.28-informational?style=flat-square) +![Version: 0.2.2](https://img.shields.io/badge/Version-0.2.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.0-alpha.29](https://img.shields.io/badge/AppVersion-0.1.0--alpha.29-informational?style=flat-square) ## Source Code @@ -108,7 +108,7 @@ Kubernetes: `>=1.18.0-0` | image.pullSecrets | list | `[]` | The image pull secrets | | image.registry | string | `"docker.io"` | The image registry | | image.repository | string | `"greptime/greptimedb-operator"` | The image repository | -| image.tag | string | `"0.1.0-alpha.28"` | The image tag | +| image.tag | string | `"v0.1.0-alpha.29"` | The image tag | | nameOverride | string | `""` | String to partially override release template name | | nodeSelector | object | `{}` | The operator node selector | | rbac.create | bool | `true` | Install role based access control | diff --git a/charts/greptimedb-operator/templates/crds/crd-greptimedbcluster.yaml b/charts/greptimedb-operator/templates/crds/crd-greptimedbcluster.yaml index c4117ff..48d712b 100644 --- a/charts/greptimedb-operator/templates/crds/crd-greptimedbcluster.yaml +++ b/charts/greptimedb-operator/templates/crds/crd-greptimedbcluster.yaml @@ -13356,6 +13356,19 @@ spec: type: string cachePath: type: string + gcs: + properties: + bucket: + type: string + endpoint: + type: string + root: + type: string + scope: + type: string + secretName: + type: string + type: object oss: properties: bucket: diff --git a/charts/greptimedb-operator/templates/crds/crd-greptimedbstandalone.yaml b/charts/greptimedb-operator/templates/crds/crd-greptimedbstandalone.yaml index 0078f8f..df49aea 100644 --- a/charts/greptimedb-operator/templates/crds/crd-greptimedbstandalone.yaml +++ b/charts/greptimedb-operator/templates/crds/crd-greptimedbstandalone.yaml @@ -2729,6 +2729,19 @@ spec: type: string cachePath: type: string + gcs: + properties: + bucket: + type: string + endpoint: + type: string + root: + type: string + scope: + type: string + secretName: + type: string + type: object oss: properties: bucket: diff --git a/charts/greptimedb-operator/values.yaml b/charts/greptimedb-operator/values.yaml index bc49e59..05a5857 100644 --- a/charts/greptimedb-operator/values.yaml +++ b/charts/greptimedb-operator/values.yaml @@ -8,7 +8,7 @@ image: # -- The image pull policy for the controller imagePullPolicy: IfNotPresent # -- The image tag - tag: 0.1.0-alpha.28 + tag: v0.1.0-alpha.29 # -- The image pull secrets pullSecrets: [] diff --git a/scripts/deploy-greptimedb-cluster.sh b/scripts/e2e/greptimedb-cluster.sh similarity index 100% rename from scripts/deploy-greptimedb-cluster.sh rename to scripts/e2e/greptimedb-cluster.sh diff --git a/scripts/deploy-greptimedb-standalone.sh b/scripts/e2e/greptimedb-standalone.sh similarity index 100% rename from scripts/deploy-greptimedb-standalone.sh rename to scripts/e2e/greptimedb-standalone.sh diff --git a/scripts/release-charts-to-acr.sh b/scripts/release/release-charts-to-acr.sh similarity index 100% rename from scripts/release-charts-to-acr.sh rename to scripts/release/release-charts-to-acr.sh diff --git a/scripts/release-charts-to-s3.sh b/scripts/release/release-charts-to-s3.sh similarity index 100% rename from scripts/release-charts-to-s3.sh rename to scripts/release/release-charts-to-s3.sh diff --git a/scripts/setup-e2e-env.sh b/scripts/setup-e2e-env.sh deleted file mode 100755 index fadfc78..0000000 --- a/scripts/setup-e2e-env.sh +++ /dev/null @@ -1,83 +0,0 @@ -#!/usr/bin/env bash - -set -o errexit -set -o nounset -set -o pipefail - -CLUSTER=greptime-chart-e2e -REGISTRY_NAME=kind-registry -REGISTRY_PORT=5001 - -function check_prerequisites() { - if ! hash docker 2>/dev/null; then - echo "docker command is not found! You can download docker here: https://docs.docker.com/get-docker/" - exit - fi - - if ! hash kind 2>/dev/null; then - echo "kind command is not found! You can download kind here: https://kind.sigs.k8s.io/docs/user/quick-start/#installing-from-release-binaries" - exit - fi - - if ! hash kubectl 2>/dev/null; then - echo "kubectl command is not found! You can download kubectl here: https://kubernetes.io/docs/tasks/tools/" - exit - fi -} - -function start_local_registry() { - # create registry container unless it already exists - if [ "$(docker inspect -f '{{.State.Running}}' "${REGISTRY_NAME}" 2>/dev/null || true)" != 'true' ]; then - docker run \ - -d --restart=always -p "127.0.0.1:${REGISTRY_PORT}:5000" --name "${REGISTRY_NAME}" \ - registry:2 - fi -} - -function create_kind_cluster() { - # check cluster - for cluster in $(kind get clusters); do - if [ "$cluster" = "${CLUSTER}" ]; then - echo "Use the existed cluster $cluster" - kubectl config use-context kind-"$cluster" - return - fi - done - - # create a cluster with the local registry enabled in containerd - cat <