Skip to content
This repository has been archived by the owner on Oct 20, 2022. It is now read-only.

Commit

Permalink
Fix makefile crds generation (#294)
Browse files Browse the repository at this point in the history
Generate CRDs to deploy dir AND both helms CRDs dirs
  • Loading branch information
PERES-Richard authored Feb 5, 2021
1 parent c0709ff commit c8f9de8
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 7 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -185,15 +185,16 @@ docker-generate-k8s:
-v $(shell go env GOCACHE):/root/.cache/go-build:delegated --env GO111MODULE=on \
--env https_proxy=$(https_proxy) --env http_proxy=$(http_proxy) \
$(BUILD_IMAGE):$(OPERATOR_SDK_VERSION) /bin/bash -c 'operator-sdk generate k8s'
cp deploy/crds/* helm/*/crds/


docker-generate-crds:
echo "Generate crds"
docker run --rm -v $(PWD):$(WORKDIR) -v $(GOPATH)/pkg/mod:/go/pkg/mod:delegated \
-v $(shell go env GOCACHE):/root/.cache/go-build:delegated --env GO111MODULE=on \
--env https_proxy=$(https_proxy) --env http_proxy=$(http_proxy) \
$(BUILD_IMAGE):$(OPERATOR_SDK_VERSION) /bin/bash -c 'operator-sdk generate crds'
@sed -i '/\- protocol/d' deploy/crds/db.orange.com_cassandraclusters_crd.yaml
cp -v deploy/crds/* helm/*/crds/
cp -v deploy/crds/* */helm/*/crds/

docker-build-operator:
echo "Build Cassandra Operator. Using cache from "$(shell go env GOCACHE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ spec:
to load along with each C* pod
properties:
image:
default: gcr.io/cassandra-operator/instaclustr-icarus:1.0.5
description: Image of backup/restore sidecar
type: string
imagePullPolicy:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ spec:
description: When set do not delete truncated SSTables after they've
been restored during CLEANUP phase. Defaults to false
type: boolean
rename:
additionalProperties:
type: string
type: object
schemaVersion:
description: Version of the schema to restore from. Upon backup, a
schema version is automatically appended to a snapshot name and
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ spec:
to load along with each C* pod
properties:
image:
default: gcr.io/cassandra-operator/instaclustr-icarus:1.0.5
description: Image of backup/restore sidecar
type: string
imagePullPolicy:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ spec:
description: When set do not delete truncated SSTables after they've
been restored during CLEANUP phase. Defaults to false
type: boolean
rename:
additionalProperties:
type: string
type: object
schemaVersion:
description: Version of the schema to restore from. Upon backup, a
schema version is automatically appended to a snapshot name and
Expand Down
1 change: 0 additions & 1 deletion pkg/controller/cassandrarestore/reconcile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ spec:
noDeleteTruncates: false
# schemaVersion:
# exactSchemaVersion:
restorationStrategyType: HARDLINKS
entities: "k1,k2.t1"
`

Expand Down
6 changes: 4 additions & 2 deletions test/e2e/kuttl/ScaleUpAndDown/00-createCluster.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
commands:
- command: helm install casskop ../../../../helm/cassandra-operator
namespaced: true
- script: |
BASEDIR=../../../..
VERSION=$(awk -F\" '/Version =/ {print $2}' $BASEDIR/version/version.go)-$CIRCLE_BRANCH
helm install casskop $BASEDIR/helm/cassandra-operator --set image.tag=$VERSION --namespace $NAMESPACE
---
apiVersion: db.orange.com/v1alpha1
kind: CassandraCluster
Expand Down
4 changes: 4 additions & 0 deletions website/docs/2_setup/1_getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ First we add the repo:
helm repo add orange-incubator https://orange-kubernetes-charts-incubator.storage.googleapis.com/
```

:::tips
If you already downloaded the helm chart previously, make sure you are using the latest version of the chart by executing a `helm repo update` before continuing.
:::

Then install the chart using Helm 3:

```bash
Expand Down

0 comments on commit c8f9de8

Please sign in to comment.