Skip to content

Commit 88305af

Browse files
committed
K8SPS-567: automatic cr.yaml generation
https://perconadev.atlassian.net/browse/K8SPS-567
1 parent 48355b0 commit 88305af

22 files changed

+2681
-2377
lines changed

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,11 @@ kuttl-shfmt:
103103
e2e-test: kuttl-shfmt
104104
ROOT_REPO=$(ROOT_REPO) kubectl kuttl test --config e2e-tests/kuttl.yaml
105105

106-
manifests: kustomize generate ## Generate Kubernetes manifests (CRDs, RBAC, operator deployment)
106+
.PHONY: generate-cr-yaml
107+
generate-cr-yaml:
108+
./cmd/example-gen/generate.sh
109+
110+
manifests: kustomize generate generate-cr-yaml ## Generate Kubernetes manifests (CRDs, RBAC, operator deployment)
107111
$(KUSTOMIZE) build config/crd/ > $(DEPLOYDIR)/crd.yaml
108112
echo "---" >> $(DEPLOYDIR)/crd.yaml
109113

api/v1/perconaservermysql_types.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,8 @@ type MySQLSpec struct {
147147

148148
VaultSecretName string `json:"vaultSecretName,omitempty"`
149149

150+
VolumeSpec *VolumeSpec `json:"volumeSpec,omitempty"`
151+
150152
PodSpec `json:",inline"`
151153
}
152154

@@ -194,7 +196,6 @@ type PodSpec struct {
194196
Size int32 `json:"size,omitempty"`
195197
Annotations map[string]string `json:"annotations,omitempty"`
196198
Labels map[string]string `json:"labels,omitempty"`
197-
VolumeSpec *VolumeSpec `json:"volumeSpec,omitempty"`
198199

199200
// Deprecated: not supported since v0.12.0. Use initContainer instead
200201
InitImage string `json:"initImage,omitempty"`
@@ -409,7 +410,6 @@ type BackupStorageS3Spec struct {
409410
CredentialsSecret string `json:"credentialsSecret"`
410411
Region string `json:"region,omitempty"`
411412
EndpointURL string `json:"endpointUrl,omitempty"`
412-
StorageClass string `json:"storageClass,omitempty"`
413413
}
414414

415415
// BucketAndPrefix returns bucket name and backup prefix from Bucket concatenated with Prefix.

api/v1/zz_generated.deepcopy.go

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/run-backup.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ request_data() {
1818
"endpointUrl": "$(json_escape "${AWS_ENDPOINT}")",
1919
"accessKey": "$(json_escape "${AWS_ACCESS_KEY_ID}")",
2020
"secretKey": "$(json_escape "${AWS_SECRET_ACCESS_KEY}")",
21-
"region": "$(json_escape "${AWS_DEFAULT_REGION}")",
22-
"storageClass": "$(json_escape "${S3_STORAGE_CLASS}")"
21+
"region": "$(json_escape "${AWS_DEFAULT_REGION}")"
2322
}
2423
}
2524
EOF

0 commit comments

Comments
 (0)