Skip to content
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

introduce provisioning via tinkerbell workflows #21

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
8 changes: 3 additions & 5 deletions Dockerfile.dapper
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,19 @@ FROM golang:1.22
ARG DAPPER_HOST_ARCH
ENV ARCH $DAPPER_HOST_ARCH

RUN export K8S_VERSION=1.24.2 && \
RUN export K8S_VERSION=1.28.0 && \
curl -sSLo envtest-bins.tar.gz "https://go.kubebuilder.io/test-tools/${K8S_VERSION}/$(go env GOOS)/$(go env GOARCH)" && \
mkdir /usr/local/kubebuilder && \
tar -C /usr/local/kubebuilder --strip-components=1 -zvxf envtest-bins.tar.gz && \
curl -sSLo kustomize.tar.gz "https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2Fv4.5.7/kustomize_v4.5.7_linux_amd64.tar.gz" && \
tar -C /usr/bin --strip-components=1 -zxvf kustomize.tar.gz && \
go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.15.0
go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.16.2

RUN apt update && \
apt install -y bash git gcc docker.io vim less file curl wget ca-certificates qemu-utils

## install golangci
RUN if [ "${ARCH}" = "amd64" ]; then \
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.57.1; \
fi
RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.59.1

# The docker version in dapper is too old to have buildx. Install it manually.
RUN curl -sSfL https://github.com/docker/buildx/releases/download/v0.13.1/buildx-v0.13.1.linux-${ARCH} -o buildx-v0.13.1.linux-${ARCH} && \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
{}
controller-gen.kubebuilder.io/version: v0.6.1
creationTimestamp: null
name: addresspools.metal.harvesterhci.io
spec:
Expand Down
14 changes: 13 additions & 1 deletion chart/seeder-crd/templates/metal.harvesterhci.io_clusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
{}
controller-gen.kubebuilder.io/version: v0.6.1
creationTimestamp: null
name: clusters.metal.harvesterhci.io
spec:
Expand Down Expand Up @@ -48,8 +48,14 @@ spec:
properties:
clusterConfig:
properties:
bondOptions:
additionalProperties:
type: string
type: object
configURL:
type: string
customProvisioningTemplate:
type: string
nameservers:
items:
type: string
Expand All @@ -58,6 +64,12 @@ spec:
items:
type: string
type: array
streamImageMode:
type: boolean
vlanID:
type: integer
wipeDisks:
type: boolean
type: object
imageURL:
type: string
Expand Down
142 changes: 137 additions & 5 deletions chart/seeder-crd/templates/metal.harvesterhci.io_inventories.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
{}
controller-gen.kubebuilder.io/version: v0.6.1
creationTimestamp: null
name: inventories.metal.harvesterhci.io
spec:
Expand Down Expand Up @@ -47,7 +47,7 @@ spec:
description: InventorySpec defines the desired state of Inventory
properties:
baseboardSpec:
description: MachineSpec defines desired machine state
description: MachineSpec defines desired machine state.
properties:
connection:
description: Connection contains connection data for a Baseboard
Expand All @@ -56,7 +56,8 @@ spec:
authSecretRef:
description: AuthSecretRef is the SecretReference that contains
authentication information of the Machine. The Secret must
contain username and password keys.
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 @@ -80,11 +81,142 @@ spec:
description: Port is the port number for connecting with the
Machine.
type: integer
providerOptions:
description: ProviderOptions contains provider specific options.
properties:
intelAMT:
description: IntelAMT contains the options to customize
the IntelAMT provider.
properties:
port:
description: Port that intelAMT will use for calls.
type: integer
required:
- port
type: object
ipmitool:
description: IPMITOOL contains the options to customize
the Ipmitool provider.
properties:
cipherSuite:
description: CipherSuite that ipmitool will use for
calls.
type: string
port:
description: Port that ipmitool will use for calls.
type: integer
type: object
redfish:
description: Redfish contains the options to customize
the Redfish provider.
properties:
port:
description: Port that redfish will use for calls.
type: integer
required:
- port
type: object
rpc:
description: RPC contains the options to customize the
RPC 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.
type: string
experimental:
description: Experimental options.
properties:
customRequestPayload:
description: CustomRequestPayload must be in json.
type: string
dotPath:
description: 'DotPath is the path to the json
object where the bmclib RequestPayload{} struct
will be embedded. For example: object.data.body'
type: string
type: object
hmac:
description: HMAC is the options used to create a
HMAC signature.
properties:
prefixSigDisabled:
description: 'PrefixSigDisabled determines whether
the algorithm will be prefixed to the signature.
Example: sha256=abc123'
type: boolean
secrets:
description: Secrets are a map of algorithms to
secrets used for signing.
type: object
logNotificationsDisabled:
description: LogNotificationsDisabled determines whether
responses from rpc consumer/listeners will be logged
or not.
type: boolean
request:
description: Request is the options used to create
the rpc HTTP request.
properties:
httpContentType:
description: HTTPContentType is the content type
to use for the rpc request notification.
type: string
httpMethod:
description: HTTPMethod is the HTTP method to
use for the rpc request notification.
type: string
staticHeaders:
additionalProperties:
items:
type: string
type: array
description: StaticHeaders are predefined headers
that will be added to every request.
type: object
timestampFormat:
description: TimestampFormat is the time format
for the timestamp header.
type: string
timestampHeader:
description: 'TimestampHeader is the header name
that should contain the timestamp. Example:
X-BMCLIB-Timestamp'
type: string
type: object
signature:
description: Signature is the options used for adding
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'
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.'
items:
type: string
type: array
type: object
required:
- consumerURL
type: object
type: object
required:
- authSecretRef
- host
- insecureTLS
- port
type: object
required:
- connection
Expand Down
6 changes: 6 additions & 0 deletions chart/seeder/Chart.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dependencies:
- name: stack
repository: file://dependency_charts/stack
version: 0.4.2
digest: sha256:b6ffbeb6ddfd1c0c5ba12899dfae5d83bde1e07d89ac3e0189131a06ed348d53
generated: "2024-03-20T16:37:55.441272+11:00"
15 changes: 6 additions & 9 deletions chart/seeder/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: seeder
description: A Helm chart for Kubernetes
name: harvester-seeder
description: A Helm chart for Harvester Seeder

# A chart can be either an 'application' or a 'library' chart.
#
Expand All @@ -15,16 +15,13 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0
version: 0.0.1-dev

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.16.0"
appVersion: v0.1.0

dependencies:
- name: boots
condition: subchartsEnabled
- name: rufio
condition: subchartsEnabled
maintainers:
- name: harvester
23 changes: 0 additions & 23 deletions chart/seeder/charts/boots/.helmignore

This file was deleted.

62 changes: 0 additions & 62 deletions chart/seeder/charts/boots/templates/_helpers.tpl

This file was deleted.

Loading