Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/go_modules/github.com/rs/zerolog-…
Browse files Browse the repository at this point in the history
…1.33.0
  • Loading branch information
mergify[bot] authored May 31, 2024
2 parents a19e49b + 81557c0 commit 1ca7b6b
Show file tree
Hide file tree
Showing 10 changed files with 141 additions and 118 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ ARG TARGETOS
# Build
RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -a -o manager main.go

FROM alpine:3.19
FROM alpine:3.20

# Install ipmitool required by the third party BMC lib.
RUN apk add --upgrade ipmitool=1.8.19-r1
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Image URL to use all building/pushing image targets
IMG ?= quay.io/tinkerbell/rufio:latest
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
ENVTEST_K8S_VERSION = 1.23
ENVTEST_K8S_VERSION = 1.28

# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
ifeq (,$(shell go env GOBIN))
Expand Down Expand Up @@ -68,7 +68,7 @@ cover: test ## Run unit tests with coverage report

.PHONY: integration-test
integration-test: manifests generate fmt vet envtest ## Run integration tests.
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) -p path)" go test ./... integration -coverprofile cover.out -tags=integration
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) -p path)" go test ./... -coverprofile cover.out -tags=integration

##@ Build

Expand Down Expand Up @@ -114,7 +114,7 @@ undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/confi
CONTROLLER_GEN = $(shell pwd)/bin/controller-gen
.PHONY: controller-gen
controller-gen: ## Download controller-gen locally if necessary.
$(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.13.0)
$(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.15.0)

KUSTOMIZE = $(shell pwd)/bin/kustomize
.PHONY: kustomize
Expand Down Expand Up @@ -177,4 +177,4 @@ puml: ## Generate PlantUML diagrams.
echo "Generating $$(basename $$pml)" ; \
filename=$$(basename $$pml .puml) ; \
plantuml -tpng $$pml ; \
done
done
6 changes: 6 additions & 0 deletions api/v1alpha1/provider_opts.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ type IPMITOOLOptions struct {
type IntelAMTOptions struct {
// Port that intelAMT will use for calls.
Port int `json:"port"`

// HostScheme determines whether to use http or https for intelAMT calls.
// +optional
// +kubebuilder:validation:Enum=http;https
// +kubebuilder:default:=http
HostScheme string `json:"hostScheme"`
}

// HMACAlgorithm is a type for HMAC algorithms.
Expand Down
68 changes: 35 additions & 33 deletions config/crd/bases/bmc.tinkerbell.org_jobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.8.0
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.15.0
name: jobs.bmc.tinkerbell.org
spec:
group: bmc.tinkerbell.org
Expand All @@ -25,23 +24,29 @@ spec:
description: Job is the Schema for the bmcjobs API.
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
spec:
description: JobSpec defines the desired state of Job.
properties:
machineRef:
description: MachineRef represents the Machine resource to execute
the job. All the tasks in the job are executed for the same Machine.
description: |-
MachineRef represents the Machine resource to execute the job.
All the tasks in the job are executed for the same Machine.
properties:
name:
description: Name of the Machine.
Expand All @@ -54,25 +59,26 @@ spec:
- namespace
type: object
tasks:
description: Tasks represents a list of baseboard management actions
to be executed. The tasks are executed sequentially. Controller
waits for one task to complete before executing the next. If a single
task fails, job execution stops and sets condition Failed. Condition
Completed is set only if all the tasks were successful.
description: |-
Tasks represents a list of baseboard management actions to be executed.
The tasks are executed sequentially. Controller waits for one task to complete before executing the next.
If a single task fails, job execution stops and sets condition Failed.
Condition Completed is set only if all the tasks were successful.
items:
description: Action represents the action to be performed. A single
task can only perform one type of action. For example either PowerAction
or OneTimeBootDeviceAction.
description: |-
Action represents the action to be performed.
A single task can only perform one type of action.
For example either PowerAction or OneTimeBootDeviceAction.
maxProperties: 1
properties:
oneTimeBootDeviceAction:
description: OneTimeBootDeviceAction represents a baseboard
management one time set boot device operation.
properties:
device:
description: Devices represents the boot devices, in order
for setting one time boot. Currently only the first device
in the slice is used to set one time boot.
description: |-
Devices represents the boot devices, in order for setting one time boot.
Currently only the first device in the slice is used to set one time boot.
items:
description: BootDevice represents boot device of the
Machine.
Expand Down Expand Up @@ -102,9 +108,9 @@ spec:
kind:
type: string
mediaURL:
description: mediaURL represents the URL of the image to
be inserted into the virtual media, or empty to eject
media.
description: |-
mediaURL represents the URL of the image to be inserted into the virtual media, or empty to
eject media.
type: string
required:
- kind
Expand All @@ -120,7 +126,8 @@ spec:
description: JobStatus defines the observed state of Job.
properties:
completionTime:
description: CompletionTime represents time when the job was completed.
description: |-
CompletionTime represents time when the job was completed.
The completion time is only set when the job finishes successfully.
format: date-time
type: string
Expand All @@ -134,8 +141,9 @@ spec:
details about last transition.
type: string
status:
description: Status is the status of the Job condition. Can
be True or False.
description: |-
Status is the status of the Job condition.
Can be True or False.
type: string
type:
description: Type of the Job condition.
Expand All @@ -156,9 +164,3 @@ spec:
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
72 changes: 39 additions & 33 deletions config/crd/bases/bmc.tinkerbell.org_machines.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.8.0
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.15.0
name: machines.bmc.tinkerbell.org
spec:
group: bmc.tinkerbell.org
Expand All @@ -23,14 +22,19 @@ spec:
description: Machine is the Schema for the machines API.
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
Expand All @@ -42,10 +46,10 @@ spec:
Controller.
properties:
authSecretRef:
description: AuthSecretRef is the SecretReference that contains
authentication information of the Machine. The Secret must contain
username and password keys. This is optional as it is not required
when using the RPC provider.
description: |-
AuthSecretRef is the SecretReference that contains authentication information of the Machine.
The Secret must contain username and password keys. This is optional as it is not required when using
the RPC provider.
properties:
name:
description: name is unique within a namespace to reference
Expand All @@ -56,6 +60,7 @@ spec:
secret name must be unique.
type: string
type: object
x-kubernetes-map-type: atomic
host:
description: Host is the host IP address or hostname of the Machine.
minLength: 1
Expand All @@ -74,6 +79,14 @@ spec:
description: IntelAMT contains the options to customize the
IntelAMT provider.
properties:
hostScheme:
default: http
description: HostScheme determines whether to use http
or https for intelAMT calls.
enum:
- http
- https
type: string
port:
description: Port that intelAMT will use for calls.
type: integer
Expand Down Expand Up @@ -106,9 +119,9 @@ spec:
provider.
properties:
consumerURL:
description: ConsumerURL is the URL where an rpc consumer/listener
is running and to which we will send and receive all
notifications.
description: |-
ConsumerURL is the URL where an rpc consumer/listener is running
and to which we will send and receive all notifications.
type: string
experimental:
description: Experimental options.
Expand All @@ -134,9 +147,9 @@ spec:
secrets:
additionalProperties:
items:
description: SecretReference represents a Secret
Reference. It has enough information to retrieve
secret in any namespace
description: |-
SecretReference represents a Secret Reference. It has enough information to retrieve secret
in any namespace
properties:
name:
description: name is unique within a namespace
Expand All @@ -147,6 +160,7 @@ spec:
which the secret name must be unique.
type: string
type: object
x-kubernetes-map-type: atomic
type: array
description: Secrets are a map of algorithms to secrets
used for signing.
Expand Down Expand Up @@ -191,21 +205,19 @@ spec:
an HMAC signature to an HTTP request.
properties:
appendAlgoToHeaderDisabled:
description: 'AppendAlgoToHeaderDisabled decides whether
to append the algorithm to the signature header
or not. Example: X-BMCLIB-Signature becomes X-BMCLIB-Signature-256
When set to true, a header will be added for each
algorithm. Example: X-BMCLIB-Signature-256 and X-BMCLIB-Signature-512'
description: |-
AppendAlgoToHeaderDisabled decides whether to append the algorithm to the signature header or not.
Example: X-BMCLIB-Signature becomes X-BMCLIB-Signature-256
When set to true, a header will be added for each algorithm. Example: X-BMCLIB-Signature-256 and X-BMCLIB-Signature-512
type: boolean
headerName:
description: 'HeaderName is the header name that should
contain the signature(s). Example: X-BMCLIB-Signature'
type: string
includedPayloadHeaders:
description: 'IncludedPayloadHeaders are headers whose
values will be included in the signature payload.
Example: X-BMCLIB-My-Custom-Header All headers will
be deduplicated.'
description: |-
IncludedPayloadHeaders are headers whose values will be included in the signature payload. Example: X-BMCLIB-My-Custom-Header
All headers will be deduplicated.
items:
type: string
type: array
Expand Down Expand Up @@ -263,9 +275,3 @@ spec:
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
Loading

0 comments on commit 1ca7b6b

Please sign in to comment.