Skip to content
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
cache-dependency-path: 'go.sum'
- uses: golangci/golangci-lint-action@v6
with:
version: 'v1.61.0'
version: 'v1.63.4'
test:
name: Test
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ testbin/*
*.swp
*.swo
*~
.DS_Store
11 changes: 5 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,17 @@ RUN go mod download
# Copy the go source
COPY cmd/ cmd/
COPY api/ api/
COPY controllers/ controllers/
COPY pkg/ pkg/
COPY internal internal/

# Build
ENV CGO_ENABLED=0
RUN go build -a -o conduit-operator cmd/operator/main.go
RUN go build -a -ldflags="-s -w" -o conduit-operator cmd/operator/main.go

# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
# The delta in size between alpine and distroless is negligent.
# Alpine is preferable as provides better access to tools inside the image, if needed.
# FROM gcr.io/distroless/static:nonroot

FROM alpine:3.20
FROM alpine:3.21
WORKDIR /app
COPY --from=builder /workspace/conduit-operator /app
USER 65532:65532
Expand Down
11 changes: 6 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@ NAME := conduit-operator

CERT_MANAGER := https://github.com/cert-manager/cert-manager/releases/download/v1.9.1/cert-manager.yaml

# KUSTOMIZE_VERSION ?= v4.5.7
KUSTOMIZE_VERSION ?= v5.4.3
CTRL_GEN_VERSION ?= v0.16.3
KUSTOMIZE_VERSION ?= v5.5.0
CTRL_GEN_VERSION ?= v0.17.2
KIND_VERSION ?= v0.24.0
GOLINT_VERSION ?= v1.61.0
GOLINT_VERSION ?= v1.63.4

.EXPORT_ALL_VARIABLES:

Expand Down Expand Up @@ -83,7 +82,7 @@ manifests: bin/kustomize generate
kustomize build config/rbac > charts/conduit-operator/templates/rbac.yaml
# kustomize build config/manager > charts/conduit-operator/templates/deployment.yaml
kustomize build config/certmanager > charts/conduit-operator/templates/certificate.yaml
kustomize build config/webhook > charts/conduit-operator/templates/webhook.yaml
bin/kustomize build config/webhook > charts/conduit-operator/templates/webhook.yaml

.PHONY: crds
crds: bin/controller-gen
Expand Down Expand Up @@ -130,6 +129,7 @@ dev_delete:
dev: crds manifests kind_setup kind_image_build helm_upgrade
helm_upgrade:
helm upgrade $(NAME) \
--debug \
--atomic \
--create-namespace --namespace $(NAME) \
--install \
Expand All @@ -141,4 +141,5 @@ helm_upgrade:
--set "service.type=NodePort" \
--set "image.tag=$(TAG)" \
--set "image.pullPolicy=Never" \
$(HELM_EXTRA_OPTS) \
$(CURDIR)/charts/conduit-operator
6 changes: 5 additions & 1 deletion PROJECT
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Code generated by tool. DO NOT EDIT.
# This file is used to track the info used to scaffold your project
# and allow the plugins properly work.
# More info: https://book.kubebuilder.io/reference/project-config.html
domain: conduit.io
layout:
- go.kubebuilder.io/v3
- go.kubebuilder.io/v4
projectName: conduit-operator
repo: github.com/conduitio/conduit-operator
resources:
Expand Down
4 changes: 4 additions & 0 deletions api/v1alpha/conduit_conversion.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package v1alpha

// Hub marks this type as a conversion hub.
func (*Conduit) Hub() {}
10 changes: 6 additions & 4 deletions api/v1alpha/conduit_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const (
DeletedReason = "Deleted"
)

var conduitConditions = NewConditionSet(
var ConduitConditions = NewConditionSet(
ConditionConduitReady,
ConditionConduitConfigReady,
ConditionConduitSecretReady,
Expand Down Expand Up @@ -125,24 +125,26 @@ type ConduitStatus struct {
}

func (s *ConduitStatus) SetCondition(ct ConditionType, status corev1.ConditionStatus, reason string, message string) {
s.Conditions = conduitConditions.SetCondition(s.Conditions, ct, status, reason, message)
s.Conditions = ConduitConditions.SetCondition(s.Conditions, ct, status, reason, message)
}

func (s *ConduitStatus) GetCondition(ct ConditionType) *Condition {
return conduitConditions.GetCondition(s.Conditions, ct)
return ConduitConditions.GetCondition(s.Conditions, ct)
}

// ConditionChanged returns true when the expected condition status does not match current status
func (s *ConduitStatus) ConditionChanged(ct ConditionType, expected corev1.ConditionStatus) bool {
if cond := conduitConditions.GetCondition(s.Conditions, ct); cond != nil {
if cond := ConduitConditions.GetCondition(s.Conditions, ct); cond != nil {
return cond.Status != expected
}

return false
}

//+kubebuilder:object:root=true
//+kubebuilder:storageversion
//+kubebuilder:subresource:status
//+kubebuilder:conversion:hub

// Conduit is the Schema for the conduits API
type Conduit struct {
Expand Down
32 changes: 0 additions & 32 deletions api/v1alpha/conduit_validator.go

This file was deleted.

218 changes: 0 additions & 218 deletions api/v1alpha/conduit_webhook.go

This file was deleted.

Loading