Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore ClusterName for copySnapshot API #58

Merged
merged 1 commit into from
Feb 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions apis/v1alpha1/ack-generate-metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
ack_generate_info:
build_date: "2023-02-03T00:39:12Z"
build_hash: c6651c200ba136e5c7f50ad8be751fae060a38e6
build_date: "2023-02-07T22:28:52Z"
build_hash: b55ae8752ece381c383ffe5b388ed2147c6b30d8
go_version: go1.19
version: v0.22.0-1-gc6651c2
version: v0.23.1
api_directory_checksum: ee32acc4d4a0ba7e2823dd20fdbe2c4ef1d9e0f4
api_version: v1alpha1
aws_sdk_go_version: v1.44.93
generator_config_info:
file_checksum: d7ad13c5bc8d9e9e2171c92dc3ac51c2b5e3b769
file_checksum: 19e41b58c6c4d1971db53e6c1694da632d71d053
original_file_name: generator.yaml
last_modification:
reason: API generation
1 change: 1 addition & 0 deletions apis/v1alpha1/generator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ resources:
path: SourceSnapshotName
ClusterName:
is_primary_key: false
is_required: false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see any changes to the API file which I would expect to see if this worked

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hopefully it could work

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I understand - the v0.23.1 code-generator fixed a bug where we weren't properly setting required on fields that were imported as custom. Because we now are, and this field was required, it was marking it as such even though we don't want it to be. So setting the is_required manually suppresses that. 👍🏼

from:
operation: CreateSnapshot
path: ClusterName
Expand Down
9 changes: 4 additions & 5 deletions config/controller/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
apiVersion: v1
kind: Namespace
metadata:
labels:
control-plane: controller
name: ack-system
---
apiVersion: apps/v1
Expand All @@ -11,16 +9,17 @@ metadata:
name: ack-memorydb-controller
namespace: ack-system
labels:
control-plane: controller
app.kubernetes.io/name: ack-memorydb-controller
app.kubernetes.io/part-of: ack-system
spec:
selector:
matchLabels:
control-plane: controller
app.kubernetes.io/name: ack-memorydb-controller
replicas: 1
template:
metadata:
labels:
control-plane: controller
app.kubernetes.io/name: ack-memorydb-controller
spec:
containers:
- command:
Expand Down
2 changes: 1 addition & 1 deletion config/controller/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
namespace: ack-system
spec:
selector:
control-plane: controller
app.kubernetes.io/name: ack-memorydb-controller
ports:
- name: metricsport
port: 8080
Expand Down
1 change: 1 addition & 0 deletions generator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ resources:
path: SourceSnapshotName
ClusterName:
is_primary_key: false
is_required: false
from:
operation: CreateSnapshot
path: ClusterName
Expand Down
1 change: 0 additions & 1 deletion helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ metadata:
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
k8s-app: {{ include "app.name" . }}
helm.sh/chart: {{ include "chart.name-version" . }}
control-plane: controller
spec:
replicas: 1
selector:
Expand Down
1 change: 0 additions & 1 deletion helm/templates/metrics-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ metadata:
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
k8s-app: {{ include "app.name" . }}
helm.sh/chart: {{ include "chart.name-version" . }}
control-plane: controller
spec:
selector:
app.kubernetes.io/name: {{ include "app.name" . }}
Expand Down