Skip to content

CLOUDP-248533: Fix X509Type as a enum #1576

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

Merged
merged 1 commit into from
May 10, 2024
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
11 changes: 6 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -206,13 +206,9 @@ manifests: CRD_OPTIONS ?= "crd:crdVersions=v1,ignoreUnexportedFields=true"
manifests: fmt controller-gen ## Generate manifests e.g. CRD, RBAC etc.
controller-gen $(CRD_OPTIONS) rbac:roleName=manager-role webhook paths="./pkg/api/..." output:crd:artifacts:config=config/crd/bases
@./scripts/split_roles_yaml.sh
@mkdir -p $(TIMESTAMPS_DIR) && touch $@

$(TIMESTAMPS_DIR)/golangci-lint:
golangci-lint:
go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(GOLANGCI_LINT_VERSION)
@mkdir -p $(TIMESTAMPS_DIR) && touch $@

golangci-lint: $(TIMESTAMPS_DIR)/golangci-lint

.PHONY: lint
lint: golangci-lint
Expand Down Expand Up @@ -495,3 +491,8 @@ docker-sbom:
gen-sdlc-checklist: envsubst docker-sbom ## Generate the SDLC checklist
@VERSION="$(VERSION)" AUTHORS="$(AUTHORS)" RELEASE_TYPE="$(RELEASE_TYPE)" \
./scripts/gen-sdlc-checklist.sh

# TODO: avoid leaving leftovers in the first place
.PHONY: clear-e2e-leftovers
clear-e2e-leftovers: ## Clear the e2e test leftovers quickly
git restore bundle* config deploy
5 changes: 5 additions & 0 deletions config/crd/bases/atlas.mongodb.com_atlasdatabaseusers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,13 @@ spec:
maxLength: 1024
type: string
x509Type:
default: NONE
description: X509Type is X.509 method by which the database authenticates
the provided username
enum:
- NONE
- MANAGED
- CUSTOMER
type: string
required:
- projectRef
Expand Down
3 changes: 3 additions & 0 deletions pkg/api/v1/atlasdatabaseuser_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ type AtlasDatabaseUserSpec struct {
AWSIAMType string `json:"awsIamType,omitempty"`

// X509Type is X.509 method by which the database authenticates the provided username
// +kubebuilder:default:=NONE
// +kubebuilder:validation:Enum:=NONE;MANAGED;CUSTOMER
// +optional
X509Type string `json:"x509Type,omitempty"`
}

Expand Down
Loading