Skip to content

Commit 8e7b71a

Browse files
authored
Initial changes for v1beta2 CRD (FoundationDB#1077)
* Initial changes for v1beta2 CRD
1 parent 9253d81 commit 8e7b71a

File tree

189 files changed

+33607
-17061
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

189 files changed

+33607
-17061
lines changed

.github/workflows/pull_request.yml

-4
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ jobs:
5858
KUBEBUILDER_VER: "2.3.2"
5959
KUSTOMIZE_VER: "v3.9.4"
6060
KIND_VER: "v0.11.1"
61-
YQ_VERSION: "v4.6.1"
6261
run: |
6362
# Only download all dependencies
6463
go get -v -t -d ./...
@@ -68,7 +67,6 @@ jobs:
6867
curl --fail -L "https://github.com/kubernetes-sigs/kubebuilder/releases/download/v${KUBEBUILDER_VER}/kubebuilder_${KUBEBUILDER_VER}_${os}_${arch}.tar.gz" -o kubebuilder.tar.gz
6968
curl --fail -L "https://github.com/apple/foundationdb/releases/download/${{ matrix.fdbver }}/foundationdb-clients_${{ matrix.fdbver }}-1_amd64.deb" -o fdb.deb
7069
curl -Lo kind https://kind.sigs.k8s.io/dl/${KIND_VER}/kind-linux-amd64
71-
curl -Lo yq.tar.gz https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64.tar.gz
7270
- name: Install dependencies
7371
env:
7472
KUBEBUILDER_VER: "2.3.2"
@@ -85,8 +83,6 @@ jobs:
8583
chmod +x kind
8684
sudo mv kind /usr/local/bin/kind
8785
./scripts/setup_kind_local_registry.sh ${{ matrix.kubever }}
88-
tar xvfz yq.tar.gz
89-
sudo mv ./yq_linux_amd64 /usr/bin/yq
9086
- name: Check for uncommitted changes
9187
run: |
9288
make clean all

Makefile

+8-12
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Image URL to use all building/pushing image targets
44
IMG ?= fdb-kubernetes-operator:latest
5-
CRD_OPTIONS ?= "crd:trivialVersions=true,maxDescLen=0,crdVersions=v1,generateEmbeddedObjectMeta=true"
5+
CRD_OPTIONS ?= "crd:maxDescLen=0,crdVersions=v1,generateEmbeddedObjectMeta=true"
66

77
ifneq "$(FDB_WEBSITE)" ""
88
img_build_args := $(img_build_args) --build-arg FDB_WEBSITE=$(FDB_WEBSITE)
@@ -55,7 +55,7 @@ $(eval $(call godep,kustomize,KUSTOMIZE))
5555
$(eval $(call godep,yq,YQ))
5656

5757
GO_SRC=$(shell find . -name "*.go" -not -name "zz_generated.*.go")
58-
GENERATED_GO=api/v1beta1/zz_generated.deepcopy.go
58+
GENERATED_GO=api/v1beta2/zz_generated.deepcopy.go
5959
GO_ALL=${GO_SRC} ${GENERATED_GO}
6060
MANIFESTS=config/crd/bases/apps.foundationdb.org_foundationdbbackups.yaml config/crd/bases/apps.foundationdb.org_foundationdbclusters.yaml config/crd/bases/apps.foundationdb.org_foundationdbrestores.yaml
6161

@@ -135,10 +135,6 @@ manifests: ${MANIFESTS}
135135

136136
${MANIFESTS}: ${CONTROLLER_GEN} ${GO_SRC}
137137
$(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases
138-
# See: https://github.com/kubernetes-sigs/controller-tools/issues/476 remove after the next release (and add a note in the release)
139-
yq e '.spec.preserveUnknownFields = false' -i ./config/crd/bases/apps.foundationdb.org_foundationdbbackups.yaml
140-
yq e '.spec.preserveUnknownFields = false' -i ./config/crd/bases/apps.foundationdb.org_foundationdbclusters.yaml
141-
yq e '.spec.preserveUnknownFields = false' -i ./config/crd/bases/apps.foundationdb.org_foundationdbrestores.yaml
142138

143139
# Run go fmt against code
144140
fmt: bin/fmt_check
@@ -184,14 +180,14 @@ config/samples/deployment.yaml: config/samples/deployment/*.yaml
184180
bin/po-docgen: cmd/po-docgen/*.go
185181
go build -o bin/po-docgen cmd/po-docgen/main.go cmd/po-docgen/api.go
186182

187-
docs/cluster_spec.md: bin/po-docgen api/v1beta1/foundationdbcluster_types.go
188-
bin/po-docgen api api/v1beta1/foundationdbcluster_types.go > docs/cluster_spec.md
183+
docs/cluster_spec.md: bin/po-docgen api/v1beta2/foundationdbcluster_types.go
184+
bin/po-docgen api api/v1beta2/foundationdbcluster_types.go > docs/cluster_spec.md
189185

190-
docs/backup_spec.md: bin/po-docgen api/v1beta1/foundationdbbackup_types.go
191-
bin/po-docgen api api/v1beta1/foundationdbbackup_types.go > docs/backup_spec.md
186+
docs/backup_spec.md: bin/po-docgen api/v1beta2/foundationdbbackup_types.go
187+
bin/po-docgen api api/v1beta2/foundationdbbackup_types.go > docs/backup_spec.md
192188

193-
docs/restore_spec.md: bin/po-docgen api/v1beta1/foundationdbrestore_types.go
194-
bin/po-docgen api api/v1beta1/foundationdbrestore_types.go > docs/restore_spec.md
189+
docs/restore_spec.md: bin/po-docgen api/v1beta2/foundationdbrestore_types.go
190+
bin/po-docgen api api/v1beta2/foundationdbrestore_types.go > docs/restore_spec.md
195191

196192
documentation: docs/cluster_spec.md docs/backup_spec.md docs/restore_spec.md
197193

PROJECT

+16-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,22 @@
1-
version: "2"
21
domain: foundationdb.org
32
repo: github.com/FoundationDB/fdb-kubernetes-operator
43
resources:
54
- group: apps
65
kind: FoundationDBCluster
76
version: v1beta1
7+
- group: apps
8+
kind: FoundationDBRestore
9+
version: v1beta1
10+
- group: apps
11+
kind: FoundationDBBackup
12+
version: v1beta1
13+
- group: apps
14+
kind: FoundationDBCluster
15+
version: v1beta2
16+
- group: apps
17+
kind: FoundationDBRestore
18+
version: v1beta2
19+
- group: apps
20+
kind: FoundationDBBackup
21+
version: v1beta2
22+
version: "2"

README.md

-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ the [API documentation](docs/cluster_spec.md).
4949
3. Set your $GOPATH, e.x. `/Users/me/Code/go`.
5050
4. Install [kustomize](https://github.com/kubernetes-sigs/kustomize).
5151
5. Install the [foundationDB client package](https://www.foundationdb.org/download).
52-
6. If you want to modify the manifests you currently need [yq](https://github.com/mikefarah/yq), we use the `v4.6.1` version.
5352

5453
### Running Locally
5554

api/v1beta1/foundationdb_custom_parameter.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* This source file is part of the FoundationDB open source project
55
*
6-
* Copyright 2021 Apple Inc. and the FoundationDB project authors
6+
* Copyright 2021-2022 Apple Inc. and the FoundationDB project authors
77
*
88
* Licensed under the Apache License, Version 2.0 (the "License");
99
* you may not use this file except in compliance with the License.

api/v1beta1/foundationdb_custom_parameter_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* This source file is part of the FoundationDB open source project
55
*
6-
* Copyright 2021 Apple Inc. and the FoundationDB project authors
6+
* Copyright 2021-2022 Apple Inc. and the FoundationDB project authors
77
*
88
* Licensed under the Apache License, Version 2.0 (the "License");
99
* you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)