Skip to content

Commit

Permalink
Fix X509Type as a enum (#1576)
Browse files Browse the repository at this point in the history
Signed-off-by: jose.vazquez <jose.vazquez@mongodb.com>
  • Loading branch information
josvazg authored May 10, 2024
1 parent d7c9ac4 commit fbbe7e0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -208,13 +208,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 @@ -497,3 +493,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

0 comments on commit fbbe7e0

Please sign in to comment.