Skip to content

Commit

Permalink
refactor(olm): remove OLM v0 support
Browse files Browse the repository at this point in the history
  • Loading branch information
lwpk110 committed Nov 15, 2024
1 parent cf83c3e commit 0196087
Show file tree
Hide file tree
Showing 38 changed files with 635 additions and 887 deletions.
2 changes: 0 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,4 @@ Network Trash Folder
Temporary Items
.apdisk

bundle.Dockerfile

kind-kubeconfig*
8 changes: 0 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,3 @@ jobs:
- name: Build and push operator
run: |
make docker-buildx
- name: Build and push operator bundle
run: |
make bundle
make bundle-buildx
- name: Build and push catalog
run: |
make catalog
make catalog-buildx
6 changes: 0 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -142,15 +142,9 @@ Network Trash Folder
Temporary Items
.apdisk

# olm
bundle.Dockerfile
bundle

**/__debug_*

kind-kubeconfig*

catalog.Dockerfile
catalog

kind-config-local.yaml
47 changes: 47 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
run:
timeout: 5m
allow-parallel-runners: true

issues:
# don't skip warning about doc comments
# don't exclude the default set of lint
exclude-use-default: false
# restore some of the defaults
# (fill in the rest as needed)
exclude-rules:
- path: "api/*"
linters:
- lll
- path: "internal/*"
linters:
- dupl
- lll
linters:
disable-all: true
enable:
- dupl
- errcheck
- copyloopvar
- ginkgolinter
- goconst
- gocyclo
- gofmt
- goimports
- gosimple
- govet
- ineffassign
- lll
- misspell
- nakedret
- prealloc
- revive
- staticcheck
- typecheck
- unconvert
- unparam
- unused

linters-settings:
revive:
rules:
- name: comment-spacings
413 changes: 130 additions & 283 deletions Makefile

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
domain: zncdata.dev
layout:
- go.kubebuilder.io/v4
plugins:
manifests.sdk.operatorframework.io/v2: {}
scorecard.sdk.operatorframework.io/v2: {}
projectName: secret-operator
repo: github.com/zncdatadev/secret-operator
resources:
Expand Down
6 changes: 1 addition & 5 deletions api/v1alpha1/secretclass_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,10 @@ type SecretClassSpec struct {

type BackendSpec struct {
// +kubebuilder:validation:Optional
// +operator-sdk:csv:customresourcedefinitions:type=spec
AutoTls *AutoTlsSpec `json:"autoTls,omitempty"`
// +kubebuilder:validation:Optional
// +operator-sdk:csv:customresourcedefinitions:type=spec
K8sSearch *K8sSearchSpec `json:"k8sSearch,omitempty"`
// +kubebuilder:validation:Optional
// +operator-sdk:csv:customresourcedefinitions:type=spec
KerberosKeytab *KerberosKeytabSpec `json:"kerberosKeytab,omitempty"`
}

Expand Down Expand Up @@ -92,7 +89,6 @@ type SecretClassStatus struct {
// +kubebuilder:resource:path=secretclasses,scope=Cluster
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
// +operator-sdk:csv:customresourcedefinitions:displayName="Secret Class"

// SecretClass is the Schema for the secretclasses API
type SecretClass struct {
Expand All @@ -103,7 +99,7 @@ type SecretClass struct {
Status SecretClassStatus `json:"status,omitempty"`
}

//+kubebuilder:object:root=true
// +kubebuilder:object:root=true

// SecretClassList contains a list of SecretClass
type SecretClassList struct {
Expand Down
10 changes: 3 additions & 7 deletions api/v1alpha1/secretcsi_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,12 @@ const (
// SecretCSISpec defines the desired state of SecretCSI
type SecretCSISpec struct {
// +kubebuilder:validation:Optional
// +operator-sdk:csv:customresourcedefinitions:type=spec
CSIDriver *CSIDriverSpec `json:"csiDriver,omitempty"`
// +kubebuilder:validation:Optional
// +operator-sdk:csv:customresourcedefinitions:type=spec
NodeDriverRegistrar *NodeDriverRegistrarSpec `json:"nodeDriverRegistrar,omitempty"`
// +kubebuilder:validation:Optional
// +operator-sdk:csv:customresourcedefinitions:type=spec
CSIProvisioner *CSIProvisionerSpec `json:"csiProvisioner,omitempty"`
// +kubebuilder:validation:Optional
// +operator-sdk:csv:customresourcedefinitions:type=spec
LivenessProbe *LivenessProbeSpec `json:"livenessProbe,omitempty"`
}

Expand Down Expand Up @@ -155,8 +151,8 @@ type SecretCSIStatus struct {
Conditions []metav1.Condition `json:"conditions"`
}

//+kubebuilder:object:root=true
//+kubebuilder:subresource:status
// +kubebuilder:object:root=true
// +kubebuilder:subresource:status

// SecretCSI is the Schema for the secretcsis API
type SecretCSI struct {
Expand All @@ -167,7 +163,7 @@ type SecretCSI struct {
Status SecretCSIStatus `json:"status,omitempty"`
}

//+kubebuilder:object:root=true
// +kubebuilder:object:root=true

// SecretCSIList contains a list of SecretCSI
type SecretCSIList struct {
Expand Down
119 changes: 0 additions & 119 deletions catalog-template.yaml

This file was deleted.

Loading

0 comments on commit 0196087

Please sign in to comment.