Skip to content

Disable healthcheck, fix formatting errs #307

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
3 changes: 0 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,8 @@ linters:
- cyclop
- copyloopvar
- err113
- execinquery
- exhaustive
- exhaustruct
- exportloopref
- forbidigo
- forcetypeassert
- gci
Expand All @@ -53,7 +51,6 @@ linters:
- gocognit
- godot
- godox
- gomnd
- gosec
- gofumpt
- govet
Expand Down
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
SHELL:=/bin/bash
VERSION=$(git describe --tags --always)

CONTROLLER_TOOLS_VERSION ?= v0.17.2
CONTROLLER_GEN ?= $(TOOLS_DIR)/controller-gen

##@ Development

.PHONY: build
Expand Down Expand Up @@ -32,10 +35,21 @@ check: compiled ## Ensure generated files and dependencies are up-to-date

##@ Generators

CRD_OPTIONS ?= crd:ignoreUnexportedFields=true,crdVersions=v1

HELM_DIR ?= $(shell pwd)/helm
HELM_CRD_DIR ?= $(HELM_DIR)/platform-operator/templates/crds

$(HELM_DIR) $(HELM_CRD_DIR):
@mkdir -p $@

api: tools ## Generate API objects
controller-gen object paths="./pkg/api/hephaestus/..."

crds: tools ## Generate CRDs
controller-gen | $(HELM_CRD_DIR) ## Generate CustomResourceDefinition objects.
$(CONTROLLER_GEN) $(CRD_OPTIONS) paths="./..." output:crd:artifacts:config="deployments/crds"

controller-gen crd paths="./..." output:crd:artifacts:config=deployments/crds

client: tools ## Generate Go client API library
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.15.0
controller-gen.kubebuilder.io/version: v0.17.2
name: imagebuildmessages.hephaestus.dominodatalab.com
spec:
group: hephaestus.dominodatalab.com
Expand Down Expand Up @@ -64,7 +64,6 @@ spec:
description: |-
ImageBuildStatusTransitionMessage contains information about ImageBuild status transitions.


This type is used to publish JSON-formatted messages to one or more configured messaging
endpoints when ImageBuild resources undergo phase changes during the build process.
properties:
Expand Down
21 changes: 4 additions & 17 deletions deployments/crds/hephaestus.dominodatalab.com_imagebuilds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.15.0
controller-gen.kubebuilder.io/version: v0.17.2
name: imagebuilds.hephaestus.dominodatalab.com
spec:
group: hephaestus.dominodatalab.com
Expand Down Expand Up @@ -167,16 +167,8 @@ spec:
type: string
conditions:
items:
description: "Condition contains details for one aspect of the current
state of this API Resource.\n---\nThis struct is intended for
direct use as an array at the field path .status.conditions. For
example,\n\n\n\ttype FooStatus struct{\n\t // Represents the
observations of a foo's current state.\n\t // Known .status.conditions.type
are: \"Available\", \"Progressing\", and \"Degraded\"\n\t //
+patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t
\ // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\"
patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t
\ // other fields\n\t}"
description: Condition contains details for one aspect of the current
state of this API Resource.
properties:
lastTransitionTime:
description: |-
Expand Down Expand Up @@ -217,12 +209,7 @@ spec:
- Unknown
type: string
type:
description: |-
type of condition in CamelCase or in foo.example.com/CamelCase.
---
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
useful (see .node.status.conditions), the ability to deconflict is important.
The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
description: type of condition in CamelCase or in foo.example.com/CamelCase.
maxLength: 316
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
type: string
Expand Down
21 changes: 4 additions & 17 deletions deployments/crds/hephaestus.dominodatalab.com_imagecaches.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.15.0
controller-gen.kubebuilder.io/version: v0.17.2
name: imagecaches.hephaestus.dominodatalab.com
spec:
group: hephaestus.dominodatalab.com
Expand Down Expand Up @@ -108,16 +108,8 @@ spec:
type: array
conditions:
items:
description: "Condition contains details for one aspect of the current
state of this API Resource.\n---\nThis struct is intended for
direct use as an array at the field path .status.conditions. For
example,\n\n\n\ttype FooStatus struct{\n\t // Represents the
observations of a foo's current state.\n\t // Known .status.conditions.type
are: \"Available\", \"Progressing\", and \"Degraded\"\n\t //
+patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t
\ // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\"
patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t
\ // other fields\n\t}"
description: Condition contains details for one aspect of the current
state of this API Resource.
properties:
lastTransitionTime:
description: |-
Expand Down Expand Up @@ -158,12 +150,7 @@ spec:
- Unknown
type: string
type:
description: |-
type of condition in CamelCase or in foo.example.com/CamelCase.
---
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
useful (see .node.status.conditions), the ability to deconflict is important.
The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
description: type of condition in CamelCase or in foo.example.com/CamelCase.
maxLength: 316
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
type: string
Expand Down
6 changes: 3 additions & 3 deletions deployments/helm/hephaestus/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ apiVersion: v2
type: application
name: hephaestus
version: 0.0.0
appVersion: "latest"
appVersion: latest
kubeVersion: ">= 1.19.0-0"
description: Kubernetes operator that builds OCI images using buildkit.
home: https://github.com/dominodatalab/hephaestus
sources:
- https://github.com/dominodatalab/hephaestus
- https://github.com/moby/buildkit
maintainers:
- name: Sonny Garcia
email: sonny.garcia@dominodatalab.com
- name: Domino Data Lab
email: open-source@dominodatalab.com
dependencies:
- name: common
version: 2.27.0
Expand Down
6 changes: 4 additions & 2 deletions deployments/helm/hephaestus/templates/controller/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: Secret
metadata:
name: {{ include "hephaestus.configSecretName" . }}
labels:
{{- include "hephaestus.controller.labels.standard" . | nindent 4 }}
{{ include "hephaestus.controller.labels.standard" . | nindent 4 }}
type: Opaque
stringData:
config.yaml: |
Expand Down Expand Up @@ -35,7 +35,7 @@ stringData:
poolMaxIdleTime: {{ . | quote }}
{{- end }}
{{- with .Values.controller.manager.poolEndpointWatchTimeout }}
poolEndpointWatchTimeout {{ . | quote }}
poolEndpointWatchTimeout: {{ . | quote }}
{{- end }}
{{- with .Values.controller.manager.fetchAndExtractTimeout }}
fetchAndExtractTimeout {{ . | quote }}
Expand Down Expand Up @@ -112,6 +112,8 @@ stringData:
auth:
strategy: bearer
token: {{ .Values.newRelic.licenseKey }}
healthcheck:
enabled: false
{{- end }}
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ metadata:
{{- include "hephaestus.webhook.annotations" . | nindent 4 }}
webhooks:
- name: mutate-imagebuild.hephaestus.dominodatalab.com
admissionReviewVersions: ["v1"]
admissionReviewVersions: [v1]
failurePolicy: Fail
sideEffects: None
clientConfig:
Expand All @@ -17,7 +17,7 @@ webhooks:
namespace: {{ .Release.Namespace }}
path: /mutate-hephaestus-dominodatalab-com-v1-imagebuild
rules:
- apiGroups: ["hephaestus.dominodatalab.com"]
apiVersions: ["v1"]
operations: ["CREATE", "UPDATE"]
resources: ["imagebuilds"]
- apiGroups: [hephaestus.dominodatalab.com]
apiVersions: [v1]
operations: [CREATE, UPDATE]
resources: [imagebuilds]
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
metadata:
name: {{ include "common.names.fullname" . }}-{{ .Release.Namespace }}
name: "{{ include "common.names.fullname" . }}-{{ .Release.Namespace }}"
labels:
{{- include "hephaestus.controller.labels.standard" . | nindent 4 }}
{{ include "hephaestus.controller.labels.standard" . | nindent 4 }}
annotations:
{{- include "hephaestus.webhook.annotations" . | nindent 4 }}
{{ include "hephaestus.webhook.annotations" . | nindent 4 }}
webhooks:
- name: validate-imagebuild.hephaestus.dominodatalab.com
admissionReviewVersions: ["v1"]
admissionReviewVersions: [v1]
failurePolicy: Fail
sideEffects: None
clientConfig:
Expand All @@ -17,12 +17,12 @@ webhooks:
namespace: {{ .Release.Namespace }}
path: /validate-hephaestus-dominodatalab-com-v1-imagebuild
rules:
- apiGroups: ["hephaestus.dominodatalab.com"]
apiVersions: ["v1"]
operations: ["CREATE", "UPDATE"]
resources: ["imagebuilds"]
- apiGroups: [ hephaestus.dominodatalab.com ]
apiVersions: [ v1 ]
operations: [ CREATE, UPDATE ]
resources: [ imagebuilds ]
- name: validate-imagecache.hephaestus.dominodatalab.com
admissionReviewVersions: ["v1"]
admissionReviewVersions: [ v1 ]
failurePolicy: Fail
sideEffects: None
clientConfig:
Expand All @@ -31,7 +31,7 @@ webhooks:
namespace: {{ .Release.Namespace }}
path: /validate-hephaestus-dominodatalab-com-v1-imagecache
rules:
- apiGroups: ["hephaestus.dominodatalab.com"]
apiVersions: ["v1"]
operations: ["CREATE", "UPDATE"]
resources: ["imagecaches"]
- apiGroups: [hephaestus.dominodatalab.com]
apiVersions: [v1]
operations: [CREATE, UPDATE]
resources: [imagecaches]
11 changes: 6 additions & 5 deletions deployments/helm/hephaestus/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,10 @@ controller:
enabled: false
# Remote AMQP server configuration
amqp:
url: "amqp://user:[email protected]:5672"
# AMQP URL
url: amqp://user:[email protected]:5672
exchange: ""
queue: "hephaestus.imagebuilds.status"
queue: hephaestus.imagebuilds.status
# Remote Kafka cluster configuration
kafka: {}

Expand Down Expand Up @@ -224,7 +225,7 @@ controller:
image:
registry: ""
repository: timberio/vector
tag: 0.37.1-distroless-static
tag: 0.45.0-distroless-static
pullPolicy: IfNotPresent
pullSecrets: []

Expand Down Expand Up @@ -273,15 +274,15 @@ buildkit:
image:
registry: ""
repository: moby/buildkit
tag: v0.18.2
tag: v0.20.0
pullPolicy: IfNotPresent
pullSecrets: []

# Buildkit image
rootlessImage:
registry: ""
repository: moby/buildkit
tag: v0.18.2-rootless
tag: v0.20.0-rootless
pullPolicy: IfNotPresent
pullSecrets: []

Expand Down
Loading