mirror of
https://github.com/siderolabs/sidero.git
synced 2025-08-06 06:37:04 +02:00
feat: update for Talos 1.3.0
Rename to siderolabs, bump dependencies, controller-runtime, get rid of netaddr, new SideroLink API, etc. Use bootstrap cluster with a control plane + worker to avoid nasty restarts when host-mode SideroLink IP pops up. Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
This commit is contained in:
parent
c95184a318
commit
fbcd02a45d
@ -42,8 +42,8 @@ ARG CGO_ENABLED
|
||||
ENV CGO_ENABLED ${CGO_ENABLED}
|
||||
ENV GOCACHE /.cache/go-build
|
||||
ENV GOMODCACHE /.cache/mod
|
||||
RUN --mount=type=cache,target=/.cache go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.9.2
|
||||
RUN --mount=type=cache,target=/.cache go install k8s.io/code-generator/cmd/conversion-gen@v0.24.2
|
||||
RUN --mount=type=cache,target=/.cache go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.10.0
|
||||
RUN --mount=type=cache,target=/.cache go install k8s.io/code-generator/cmd/conversion-gen@v0.25.0
|
||||
RUN --mount=type=cache,target=/.cache go install mvdan.cc/gofumpt/gofumports@v0.1.1
|
||||
RUN go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.47.2 \
|
||||
&& mv /go/bin/golangci-lint /toolchain/bin/golangci-lint
|
||||
@ -305,7 +305,7 @@ FROM sfyra-base AS sfyra-build
|
||||
WORKDIR /src/sfyra/cmd/sfyra
|
||||
ARG TALOS_RELEASE
|
||||
ARG DEFAULT_K8S_VERSION
|
||||
ARG SFYRA_CMD_PKG=github.com/talos-systems/sidero/sfyra/cmd/sfyra/cmd
|
||||
ARG SFYRA_CMD_PKG=github.com/siderolabs/sidero/sfyra/cmd/sfyra/cmd
|
||||
ARG GO_BUILDFLAGS
|
||||
ARG GO_LDFLAGS
|
||||
RUN --mount=type=cache,target=/.cache GOOS=linux go build ${GO_BUILDFLAGS} -ldflags "${GO_LDFLAGS} -X ${SFYRA_CMD_PKG}.TalosRelease=${TALOS_RELEASE} -X ${SFYRA_CMD_PKG}.KubernetesVersion=${DEFAULT_K8S_VERSION}" -o /sfyra
|
||||
|
8
Makefile
8
Makefile
@ -9,12 +9,12 @@ MODULE := $(shell head -1 go.mod | cut -d' ' -f2)
|
||||
|
||||
ARTIFACTS := _out
|
||||
TEST_PKGS ?= ./...
|
||||
TALOS_RELEASE ?= v1.2.0-beta.2
|
||||
TALOS_RELEASE ?= v1.3.0
|
||||
PREVIOUS_TALOS_RELEASE ?= v0.13.4
|
||||
DEFAULT_K8S_VERSION ?= v1.25.0
|
||||
DEFAULT_K8S_VERSION ?= v1.26.0
|
||||
|
||||
TOOLS ?= ghcr.io/siderolabs/tools:v1.2.0
|
||||
PKGS ?= v1.2.0
|
||||
TOOLS ?= ghcr.io/siderolabs/tools:v1.3.0-1-g712379c
|
||||
PKGS ?= v1.3.0
|
||||
|
||||
SFYRA_CLUSTERCTL_CONFIG ?= $(HOME)/.cluster-api/clusterctl.sfyra.yaml
|
||||
|
||||
|
20
README.md
20
README.md
@ -20,19 +20,19 @@ This provider's versions are compatible with the following versions of Cluster A
|
||||
|
||||
This provider's versions are able to install and manage the following versions of Kubernetes:
|
||||
|
||||
| | v1.16 | v 1.17 | v1.18 | v1.19 | v1.20 | v1.21 | v1.22 | v1.23 | v1.24 | v1.25 |
|
||||
| ---------------------- | ----- | ------ | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- |
|
||||
| Sidero Provider (v0.3) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | | |
|
||||
| Sidero Provider (v0.4) | | | | ✓ | ✓ | ✓ | ✓ | ✓ | | |
|
||||
| Sidero Provider (v0.5) | | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||
| | v1.16 | v 1.17 | v1.18 | v1.19 | v1.20 | v1.21 | v1.22 | v1.23 | v1.24 | v1.25 | v1.26 |
|
||||
| ---------------------- | ----- | ------ | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- |
|
||||
| Sidero Provider (v0.3) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | | | |
|
||||
| Sidero Provider (v0.4) | | | | ✓ | ✓ | ✓ | ✓ | ✓ | | | |
|
||||
| Sidero Provider (v0.5) | | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||
|
||||
This provider's versions are compatible with the following versions of Talos:
|
||||
|
||||
| | v0.11 | v0.12 | v0.13 | v0.14 | v1.0 | v1.1 | v1.2 |
|
||||
| ---------------------- | ----- | ------ | ----- | ----- | ----- | ----- | ----- |
|
||||
| Sidero Provider (v0.3) | ✓ | ✓ | | | | | |
|
||||
| Sidero Provider (v0.4) | ✓ | ✓ | ✓ | ✓ | | | |
|
||||
| Sidero Provider (v0.5) | | ✓ (+) | ✓ (+) | ✓ | ✓ | ✓ | ✓ |
|
||||
| | v0.11 | v0.12 | v0.13 | v0.14 | v1.0 | v1.1 | v1.2 | v1.3 |
|
||||
| ---------------------- | ----- | ------ | ----- | ----- | ----- | ----- | ----- | ----- |
|
||||
| Sidero Provider (v0.3) | ✓ | ✓ | | | | | | |
|
||||
| Sidero Provider (v0.4) | ✓ | ✓ | ✓ | ✓ | | | | |
|
||||
| Sidero Provider (v0.5) | | ✓ (+) | ✓ (+) | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||
|
||||
> (+): Some Sidero 0.5 features (SideroLink) are only available with Talos v0.14+.
|
||||
|
||||
|
@ -4,4 +4,4 @@
|
||||
|
||||
package v1alpha2
|
||||
|
||||
// +k8s:conversion-gen=github.com/talos-systems/sidero/app/caps-controller-manager/api/v1alpha3
|
||||
// +k8s:conversion-gen=github.com/siderolabs/sidero/app/caps-controller-manager/api/v1alpha3
|
||||
|
@ -12,7 +12,7 @@ import (
|
||||
utilconversion "sigs.k8s.io/cluster-api/util/conversion"
|
||||
"sigs.k8s.io/controller-runtime/pkg/conversion"
|
||||
|
||||
infrav1alpha3 "github.com/talos-systems/sidero/app/caps-controller-manager/api/v1alpha3"
|
||||
infrav1alpha3 "github.com/siderolabs/sidero/app/caps-controller-manager/api/v1alpha3"
|
||||
)
|
||||
|
||||
// ConvertTo converts this MetalCluster to the Hub version (v1alpha3).
|
||||
|
@ -10,7 +10,7 @@ import (
|
||||
utilconversion "sigs.k8s.io/cluster-api/util/conversion"
|
||||
"sigs.k8s.io/controller-runtime/pkg/conversion"
|
||||
|
||||
infrav1alpha3 "github.com/talos-systems/sidero/app/caps-controller-manager/api/v1alpha3"
|
||||
infrav1alpha3 "github.com/siderolabs/sidero/app/caps-controller-manager/api/v1alpha3"
|
||||
)
|
||||
|
||||
// ConvertTo converts this MetalMachine to the Hub version (v1alpha3).
|
||||
|
@ -9,7 +9,7 @@ import (
|
||||
utilconversion "sigs.k8s.io/cluster-api/util/conversion"
|
||||
"sigs.k8s.io/controller-runtime/pkg/conversion"
|
||||
|
||||
infrav1alpha3 "github.com/talos-systems/sidero/app/caps-controller-manager/api/v1alpha3"
|
||||
infrav1alpha3 "github.com/siderolabs/sidero/app/caps-controller-manager/api/v1alpha3"
|
||||
)
|
||||
|
||||
// ConvertTo converts this MetalMachineTemplate to the Hub version (v1alpha3).
|
||||
|
@ -16,7 +16,7 @@ import (
|
||||
conversion "k8s.io/apimachinery/pkg/conversion"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
|
||||
v1alpha3 "github.com/talos-systems/sidero/app/caps-controller-manager/api/v1alpha3"
|
||||
v1alpha3 "github.com/siderolabs/sidero/app/caps-controller-manager/api/v1alpha3"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.9.2
|
||||
controller-gen.kubebuilder.io/version: v0.10.0
|
||||
creationTimestamp: null
|
||||
name: metalclusters.infrastructure.cluster.x-k8s.io
|
||||
spec:
|
||||
|
@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.9.2
|
||||
controller-gen.kubebuilder.io/version: v0.10.0
|
||||
creationTimestamp: null
|
||||
name: metalmachines.infrastructure.cluster.x-k8s.io
|
||||
spec:
|
||||
@ -42,29 +42,30 @@ spec:
|
||||
cloud provider.
|
||||
type: string
|
||||
serverRef:
|
||||
description: 'ObjectReference contains enough information to let you
|
||||
description: "ObjectReference contains enough information to let you
|
||||
inspect or modify the referred object. --- New uses of this type
|
||||
are discouraged because of difficulty describing its usage when
|
||||
embedded in APIs. 1. Ignored fields. It includes many fields which
|
||||
are not generally honored. For instance, ResourceVersion and FieldPath
|
||||
are both very rarely valid in actual usage. 2. Invalid usage help. It
|
||||
is impossible to add specific help for individual usage. In most
|
||||
embedded usages, there are particular restrictions like, "must refer
|
||||
only to types A and B" or "UID not honored" or "name must be restricted".
|
||||
Those cannot be well described when embedded. 3. Inconsistent validation. Because
|
||||
the usages are different, the validation rules are different by
|
||||
usage, which makes it hard for users to predict what will happen.
|
||||
4. The fields are both imprecise and overly precise. Kind is not
|
||||
a precise mapping to a URL. This can produce ambiguity during interpretation
|
||||
and require a REST mapping. In most cases, the dependency is on
|
||||
the group,resource tuple and the version of the actual struct is
|
||||
irrelevant. 5. We cannot easily change it. Because this type is
|
||||
embedded in many locations, updates to this type will affect numerous
|
||||
schemas. Don''t make new APIs embed an underspecified API type
|
||||
they do not control. Instead of using this type, create a locally
|
||||
provided and used type that is well-focused on your reference. For
|
||||
example, ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533
|
||||
.'
|
||||
are both very rarely valid in actual usage. 2. Invalid usage help.
|
||||
\ It is impossible to add specific help for individual usage. In
|
||||
most embedded usages, there are particular restrictions like, \"must
|
||||
refer only to types A and B\" or \"UID not honored\" or \"name must
|
||||
be restricted\". Those cannot be well described when embedded. 3.
|
||||
Inconsistent validation. Because the usages are different, the
|
||||
validation rules are different by usage, which makes it hard for
|
||||
users to predict what will happen. 4. The fields are both imprecise
|
||||
and overly precise. Kind is not a precise mapping to a URL. This
|
||||
can produce ambiguity during interpretation and require a REST mapping.
|
||||
\ In most cases, the dependency is on the group,resource tuple and
|
||||
the version of the actual struct is irrelevant. 5. We cannot easily
|
||||
change it. Because this type is embedded in many locations, updates
|
||||
to this type will affect numerous schemas. Don't make new APIs
|
||||
embed an underspecified API type they do not control. \n Instead
|
||||
of using this type, create a locally provided and used type that
|
||||
is well-focused on your reference. For example, ServiceReferences
|
||||
for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533
|
||||
."
|
||||
properties:
|
||||
apiVersion:
|
||||
description: API version of the referent.
|
||||
@ -193,29 +194,30 @@ spec:
|
||||
cloud provider.
|
||||
type: string
|
||||
serverClassRef:
|
||||
description: 'ObjectReference contains enough information to let you
|
||||
description: "ObjectReference contains enough information to let you
|
||||
inspect or modify the referred object. --- New uses of this type
|
||||
are discouraged because of difficulty describing its usage when
|
||||
embedded in APIs. 1. Ignored fields. It includes many fields which
|
||||
are not generally honored. For instance, ResourceVersion and FieldPath
|
||||
are both very rarely valid in actual usage. 2. Invalid usage help. It
|
||||
is impossible to add specific help for individual usage. In most
|
||||
embedded usages, there are particular restrictions like, "must refer
|
||||
only to types A and B" or "UID not honored" or "name must be restricted".
|
||||
Those cannot be well described when embedded. 3. Inconsistent validation. Because
|
||||
the usages are different, the validation rules are different by
|
||||
usage, which makes it hard for users to predict what will happen.
|
||||
4. The fields are both imprecise and overly precise. Kind is not
|
||||
a precise mapping to a URL. This can produce ambiguity during interpretation
|
||||
and require a REST mapping. In most cases, the dependency is on
|
||||
the group,resource tuple and the version of the actual struct is
|
||||
irrelevant. 5. We cannot easily change it. Because this type is
|
||||
embedded in many locations, updates to this type will affect numerous
|
||||
schemas. Don''t make new APIs embed an underspecified API type
|
||||
they do not control. Instead of using this type, create a locally
|
||||
provided and used type that is well-focused on your reference. For
|
||||
example, ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533
|
||||
.'
|
||||
are both very rarely valid in actual usage. 2. Invalid usage help.
|
||||
\ It is impossible to add specific help for individual usage. In
|
||||
most embedded usages, there are particular restrictions like, \"must
|
||||
refer only to types A and B\" or \"UID not honored\" or \"name must
|
||||
be restricted\". Those cannot be well described when embedded. 3.
|
||||
Inconsistent validation. Because the usages are different, the
|
||||
validation rules are different by usage, which makes it hard for
|
||||
users to predict what will happen. 4. The fields are both imprecise
|
||||
and overly precise. Kind is not a precise mapping to a URL. This
|
||||
can produce ambiguity during interpretation and require a REST mapping.
|
||||
\ In most cases, the dependency is on the group,resource tuple and
|
||||
the version of the actual struct is irrelevant. 5. We cannot easily
|
||||
change it. Because this type is embedded in many locations, updates
|
||||
to this type will affect numerous schemas. Don't make new APIs
|
||||
embed an underspecified API type they do not control. \n Instead
|
||||
of using this type, create a locally provided and used type that
|
||||
is well-focused on your reference. For example, ServiceReferences
|
||||
for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533
|
||||
."
|
||||
properties:
|
||||
apiVersion:
|
||||
description: API version of the referent.
|
||||
@ -252,29 +254,30 @@ spec:
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
serverRef:
|
||||
description: 'ObjectReference contains enough information to let you
|
||||
description: "ObjectReference contains enough information to let you
|
||||
inspect or modify the referred object. --- New uses of this type
|
||||
are discouraged because of difficulty describing its usage when
|
||||
embedded in APIs. 1. Ignored fields. It includes many fields which
|
||||
are not generally honored. For instance, ResourceVersion and FieldPath
|
||||
are both very rarely valid in actual usage. 2. Invalid usage help. It
|
||||
is impossible to add specific help for individual usage. In most
|
||||
embedded usages, there are particular restrictions like, "must refer
|
||||
only to types A and B" or "UID not honored" or "name must be restricted".
|
||||
Those cannot be well described when embedded. 3. Inconsistent validation. Because
|
||||
the usages are different, the validation rules are different by
|
||||
usage, which makes it hard for users to predict what will happen.
|
||||
4. The fields are both imprecise and overly precise. Kind is not
|
||||
a precise mapping to a URL. This can produce ambiguity during interpretation
|
||||
and require a REST mapping. In most cases, the dependency is on
|
||||
the group,resource tuple and the version of the actual struct is
|
||||
irrelevant. 5. We cannot easily change it. Because this type is
|
||||
embedded in many locations, updates to this type will affect numerous
|
||||
schemas. Don''t make new APIs embed an underspecified API type
|
||||
they do not control. Instead of using this type, create a locally
|
||||
provided and used type that is well-focused on your reference. For
|
||||
example, ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533
|
||||
.'
|
||||
are both very rarely valid in actual usage. 2. Invalid usage help.
|
||||
\ It is impossible to add specific help for individual usage. In
|
||||
most embedded usages, there are particular restrictions like, \"must
|
||||
refer only to types A and B\" or \"UID not honored\" or \"name must
|
||||
be restricted\". Those cannot be well described when embedded. 3.
|
||||
Inconsistent validation. Because the usages are different, the
|
||||
validation rules are different by usage, which makes it hard for
|
||||
users to predict what will happen. 4. The fields are both imprecise
|
||||
and overly precise. Kind is not a precise mapping to a URL. This
|
||||
can produce ambiguity during interpretation and require a REST mapping.
|
||||
\ In most cases, the dependency is on the group,resource tuple and
|
||||
the version of the actual struct is irrelevant. 5. We cannot easily
|
||||
change it. Because this type is embedded in many locations, updates
|
||||
to this type will affect numerous schemas. Don't make new APIs
|
||||
embed an underspecified API type they do not control. \n Instead
|
||||
of using this type, create a locally provided and used type that
|
||||
is well-focused on your reference. For example, ServiceReferences
|
||||
for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533
|
||||
."
|
||||
properties:
|
||||
apiVersion:
|
||||
description: API version of the referent.
|
||||
|
@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.9.2
|
||||
controller-gen.kubebuilder.io/version: v0.10.0
|
||||
creationTimestamp: null
|
||||
name: metalmachinetemplates.infrastructure.cluster.x-k8s.io
|
||||
spec:
|
||||
@ -49,32 +49,33 @@ spec:
|
||||
by the cloud provider.
|
||||
type: string
|
||||
serverRef:
|
||||
description: 'ObjectReference contains enough information
|
||||
description: "ObjectReference contains enough information
|
||||
to let you inspect or modify the referred object. --- New
|
||||
uses of this type are discouraged because of difficulty
|
||||
describing its usage when embedded in APIs. 1. Ignored fields. It
|
||||
includes many fields which are not generally honored. For
|
||||
instance, ResourceVersion and FieldPath are both very rarely
|
||||
valid in actual usage. 2. Invalid usage help. It is impossible
|
||||
to add specific help for individual usage. In most embedded
|
||||
usages, there are particular restrictions like, "must refer
|
||||
only to types A and B" or "UID not honored" or "name must
|
||||
be restricted". Those cannot be well described when embedded.
|
||||
3. Inconsistent validation. Because the usages are different,
|
||||
the validation rules are different by usage, which makes
|
||||
it hard for users to predict what will happen. 4. The fields
|
||||
are both imprecise and overly precise. Kind is not a precise
|
||||
mapping to a URL. This can produce ambiguity during interpretation
|
||||
and require a REST mapping. In most cases, the dependency
|
||||
is on the group,resource tuple and the version of the actual
|
||||
describing its usage when embedded in APIs. 1. Ignored fields.
|
||||
\ It includes many fields which are not generally honored.
|
||||
\ For instance, ResourceVersion and FieldPath are both very
|
||||
rarely valid in actual usage. 2. Invalid usage help. It
|
||||
is impossible to add specific help for individual usage.
|
||||
\ In most embedded usages, there are particular restrictions
|
||||
like, \"must refer only to types A and B\" or \"UID not
|
||||
honored\" or \"name must be restricted\". Those cannot be
|
||||
well described when embedded. 3. Inconsistent validation.
|
||||
\ Because the usages are different, the validation rules
|
||||
are different by usage, which makes it hard for users to
|
||||
predict what will happen. 4. The fields are both imprecise
|
||||
and overly precise. Kind is not a precise mapping to a
|
||||
URL. This can produce ambiguity during interpretation and
|
||||
require a REST mapping. In most cases, the dependency is
|
||||
on the group,resource tuple and the version of the actual
|
||||
struct is irrelevant. 5. We cannot easily change it. Because
|
||||
this type is embedded in many locations, updates to this
|
||||
type will affect numerous schemas. Don''t make new APIs
|
||||
embed an underspecified API type they do not control. Instead
|
||||
of using this type, create a locally provided and used type
|
||||
that is well-focused on your reference. For example, ServiceReferences
|
||||
for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533
|
||||
.'
|
||||
type will affect numerous schemas. Don't make new APIs
|
||||
embed an underspecified API type they do not control. \n
|
||||
Instead of using this type, create a locally provided and
|
||||
used type that is well-focused on your reference. For example,
|
||||
ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533
|
||||
."
|
||||
properties:
|
||||
apiVersion:
|
||||
description: API version of the referent.
|
||||
@ -157,32 +158,33 @@ spec:
|
||||
by the cloud provider.
|
||||
type: string
|
||||
serverClassRef:
|
||||
description: 'ObjectReference contains enough information
|
||||
description: "ObjectReference contains enough information
|
||||
to let you inspect or modify the referred object. --- New
|
||||
uses of this type are discouraged because of difficulty
|
||||
describing its usage when embedded in APIs. 1. Ignored fields. It
|
||||
includes many fields which are not generally honored. For
|
||||
instance, ResourceVersion and FieldPath are both very rarely
|
||||
valid in actual usage. 2. Invalid usage help. It is impossible
|
||||
to add specific help for individual usage. In most embedded
|
||||
usages, there are particular restrictions like, "must refer
|
||||
only to types A and B" or "UID not honored" or "name must
|
||||
be restricted". Those cannot be well described when embedded.
|
||||
3. Inconsistent validation. Because the usages are different,
|
||||
the validation rules are different by usage, which makes
|
||||
it hard for users to predict what will happen. 4. The fields
|
||||
are both imprecise and overly precise. Kind is not a precise
|
||||
mapping to a URL. This can produce ambiguity during interpretation
|
||||
and require a REST mapping. In most cases, the dependency
|
||||
is on the group,resource tuple and the version of the actual
|
||||
describing its usage when embedded in APIs. 1. Ignored fields.
|
||||
\ It includes many fields which are not generally honored.
|
||||
\ For instance, ResourceVersion and FieldPath are both very
|
||||
rarely valid in actual usage. 2. Invalid usage help. It
|
||||
is impossible to add specific help for individual usage.
|
||||
\ In most embedded usages, there are particular restrictions
|
||||
like, \"must refer only to types A and B\" or \"UID not
|
||||
honored\" or \"name must be restricted\". Those cannot be
|
||||
well described when embedded. 3. Inconsistent validation.
|
||||
\ Because the usages are different, the validation rules
|
||||
are different by usage, which makes it hard for users to
|
||||
predict what will happen. 4. The fields are both imprecise
|
||||
and overly precise. Kind is not a precise mapping to a
|
||||
URL. This can produce ambiguity during interpretation and
|
||||
require a REST mapping. In most cases, the dependency is
|
||||
on the group,resource tuple and the version of the actual
|
||||
struct is irrelevant. 5. We cannot easily change it. Because
|
||||
this type is embedded in many locations, updates to this
|
||||
type will affect numerous schemas. Don''t make new APIs
|
||||
embed an underspecified API type they do not control. Instead
|
||||
of using this type, create a locally provided and used type
|
||||
that is well-focused on your reference. For example, ServiceReferences
|
||||
for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533
|
||||
.'
|
||||
type will affect numerous schemas. Don't make new APIs
|
||||
embed an underspecified API type they do not control. \n
|
||||
Instead of using this type, create a locally provided and
|
||||
used type that is well-focused on your reference. For example,
|
||||
ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533
|
||||
."
|
||||
properties:
|
||||
apiVersion:
|
||||
description: API version of the referent.
|
||||
@ -220,32 +222,33 @@ spec:
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
serverRef:
|
||||
description: 'ObjectReference contains enough information
|
||||
description: "ObjectReference contains enough information
|
||||
to let you inspect or modify the referred object. --- New
|
||||
uses of this type are discouraged because of difficulty
|
||||
describing its usage when embedded in APIs. 1. Ignored fields. It
|
||||
includes many fields which are not generally honored. For
|
||||
instance, ResourceVersion and FieldPath are both very rarely
|
||||
valid in actual usage. 2. Invalid usage help. It is impossible
|
||||
to add specific help for individual usage. In most embedded
|
||||
usages, there are particular restrictions like, "must refer
|
||||
only to types A and B" or "UID not honored" or "name must
|
||||
be restricted". Those cannot be well described when embedded.
|
||||
3. Inconsistent validation. Because the usages are different,
|
||||
the validation rules are different by usage, which makes
|
||||
it hard for users to predict what will happen. 4. The fields
|
||||
are both imprecise and overly precise. Kind is not a precise
|
||||
mapping to a URL. This can produce ambiguity during interpretation
|
||||
and require a REST mapping. In most cases, the dependency
|
||||
is on the group,resource tuple and the version of the actual
|
||||
describing its usage when embedded in APIs. 1. Ignored fields.
|
||||
\ It includes many fields which are not generally honored.
|
||||
\ For instance, ResourceVersion and FieldPath are both very
|
||||
rarely valid in actual usage. 2. Invalid usage help. It
|
||||
is impossible to add specific help for individual usage.
|
||||
\ In most embedded usages, there are particular restrictions
|
||||
like, \"must refer only to types A and B\" or \"UID not
|
||||
honored\" or \"name must be restricted\". Those cannot be
|
||||
well described when embedded. 3. Inconsistent validation.
|
||||
\ Because the usages are different, the validation rules
|
||||
are different by usage, which makes it hard for users to
|
||||
predict what will happen. 4. The fields are both imprecise
|
||||
and overly precise. Kind is not a precise mapping to a
|
||||
URL. This can produce ambiguity during interpretation and
|
||||
require a REST mapping. In most cases, the dependency is
|
||||
on the group,resource tuple and the version of the actual
|
||||
struct is irrelevant. 5. We cannot easily change it. Because
|
||||
this type is embedded in many locations, updates to this
|
||||
type will affect numerous schemas. Don''t make new APIs
|
||||
embed an underspecified API type they do not control. Instead
|
||||
of using this type, create a locally provided and used type
|
||||
that is well-focused on your reference. For example, ServiceReferences
|
||||
for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533
|
||||
.'
|
||||
type will affect numerous schemas. Don't make new APIs
|
||||
embed an underspecified API type they do not control. \n
|
||||
Instead of using this type, create a locally provided and
|
||||
used type that is well-focused on your reference. For example,
|
||||
ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533
|
||||
."
|
||||
properties:
|
||||
apiVersion:
|
||||
description: API version of the referent.
|
||||
|
@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.9.2
|
||||
controller-gen.kubebuilder.io/version: v0.10.0
|
||||
creationTimestamp: null
|
||||
name: serverbindings.infrastructure.cluster.x-k8s.io
|
||||
spec:
|
||||
@ -76,29 +76,30 @@ spec:
|
||||
description: Hostname describes node hostname for the server.
|
||||
type: string
|
||||
metalMachineRef:
|
||||
description: 'ObjectReference contains enough information to let you
|
||||
description: "ObjectReference contains enough information to let you
|
||||
inspect or modify the referred object. --- New uses of this type
|
||||
are discouraged because of difficulty describing its usage when
|
||||
embedded in APIs. 1. Ignored fields. It includes many fields which
|
||||
are not generally honored. For instance, ResourceVersion and FieldPath
|
||||
are both very rarely valid in actual usage. 2. Invalid usage help. It
|
||||
is impossible to add specific help for individual usage. In most
|
||||
embedded usages, there are particular restrictions like, "must refer
|
||||
only to types A and B" or "UID not honored" or "name must be restricted".
|
||||
Those cannot be well described when embedded. 3. Inconsistent validation. Because
|
||||
the usages are different, the validation rules are different by
|
||||
usage, which makes it hard for users to predict what will happen.
|
||||
4. The fields are both imprecise and overly precise. Kind is not
|
||||
a precise mapping to a URL. This can produce ambiguity during interpretation
|
||||
and require a REST mapping. In most cases, the dependency is on
|
||||
the group,resource tuple and the version of the actual struct is
|
||||
irrelevant. 5. We cannot easily change it. Because this type is
|
||||
embedded in many locations, updates to this type will affect numerous
|
||||
schemas. Don''t make new APIs embed an underspecified API type
|
||||
they do not control. Instead of using this type, create a locally
|
||||
provided and used type that is well-focused on your reference. For
|
||||
example, ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533
|
||||
.'
|
||||
are both very rarely valid in actual usage. 2. Invalid usage help.
|
||||
\ It is impossible to add specific help for individual usage. In
|
||||
most embedded usages, there are particular restrictions like, \"must
|
||||
refer only to types A and B\" or \"UID not honored\" or \"name must
|
||||
be restricted\". Those cannot be well described when embedded. 3.
|
||||
Inconsistent validation. Because the usages are different, the
|
||||
validation rules are different by usage, which makes it hard for
|
||||
users to predict what will happen. 4. The fields are both imprecise
|
||||
and overly precise. Kind is not a precise mapping to a URL. This
|
||||
can produce ambiguity during interpretation and require a REST mapping.
|
||||
\ In most cases, the dependency is on the group,resource tuple and
|
||||
the version of the actual struct is irrelevant. 5. We cannot easily
|
||||
change it. Because this type is embedded in many locations, updates
|
||||
to this type will affect numerous schemas. Don't make new APIs
|
||||
embed an underspecified API type they do not control. \n Instead
|
||||
of using this type, create a locally provided and used type that
|
||||
is well-focused on your reference. For example, ServiceReferences
|
||||
for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533
|
||||
."
|
||||
properties:
|
||||
apiVersion:
|
||||
description: API version of the referent.
|
||||
@ -135,29 +136,30 @@ spec:
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
serverClassRef:
|
||||
description: 'ObjectReference contains enough information to let you
|
||||
description: "ObjectReference contains enough information to let you
|
||||
inspect or modify the referred object. --- New uses of this type
|
||||
are discouraged because of difficulty describing its usage when
|
||||
embedded in APIs. 1. Ignored fields. It includes many fields which
|
||||
are not generally honored. For instance, ResourceVersion and FieldPath
|
||||
are both very rarely valid in actual usage. 2. Invalid usage help. It
|
||||
is impossible to add specific help for individual usage. In most
|
||||
embedded usages, there are particular restrictions like, "must refer
|
||||
only to types A and B" or "UID not honored" or "name must be restricted".
|
||||
Those cannot be well described when embedded. 3. Inconsistent validation. Because
|
||||
the usages are different, the validation rules are different by
|
||||
usage, which makes it hard for users to predict what will happen.
|
||||
4. The fields are both imprecise and overly precise. Kind is not
|
||||
a precise mapping to a URL. This can produce ambiguity during interpretation
|
||||
and require a REST mapping. In most cases, the dependency is on
|
||||
the group,resource tuple and the version of the actual struct is
|
||||
irrelevant. 5. We cannot easily change it. Because this type is
|
||||
embedded in many locations, updates to this type will affect numerous
|
||||
schemas. Don''t make new APIs embed an underspecified API type
|
||||
they do not control. Instead of using this type, create a locally
|
||||
provided and used type that is well-focused on your reference. For
|
||||
example, ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533
|
||||
.'
|
||||
are both very rarely valid in actual usage. 2. Invalid usage help.
|
||||
\ It is impossible to add specific help for individual usage. In
|
||||
most embedded usages, there are particular restrictions like, \"must
|
||||
refer only to types A and B\" or \"UID not honored\" or \"name must
|
||||
be restricted\". Those cannot be well described when embedded. 3.
|
||||
Inconsistent validation. Because the usages are different, the
|
||||
validation rules are different by usage, which makes it hard for
|
||||
users to predict what will happen. 4. The fields are both imprecise
|
||||
and overly precise. Kind is not a precise mapping to a URL. This
|
||||
can produce ambiguity during interpretation and require a REST mapping.
|
||||
\ In most cases, the dependency is on the group,resource tuple and
|
||||
the version of the actual struct is irrelevant. 5. We cannot easily
|
||||
change it. Because this type is embedded in many locations, updates
|
||||
to this type will affect numerous schemas. Don't make new APIs
|
||||
embed an underspecified API type they do not control. \n Instead
|
||||
of using this type, create a locally provided and used type that
|
||||
is well-focused on your reference. For example, ServiceReferences
|
||||
for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533
|
||||
."
|
||||
properties:
|
||||
apiVersion:
|
||||
description: API version of the referent.
|
||||
|
@ -20,8 +20,8 @@ import (
|
||||
"sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"
|
||||
"sigs.k8s.io/controller-runtime/pkg/reconcile"
|
||||
|
||||
infrav1 "github.com/talos-systems/sidero/app/caps-controller-manager/api/v1alpha3"
|
||||
"github.com/talos-systems/sidero/app/caps-controller-manager/pkg/constants"
|
||||
infrav1 "github.com/siderolabs/sidero/app/caps-controller-manager/api/v1alpha3"
|
||||
"github.com/siderolabs/sidero/app/caps-controller-manager/pkg/constants"
|
||||
)
|
||||
|
||||
// MetalClusterReconciler reconciles a MetalCluster object.
|
||||
|
@ -31,9 +31,9 @@ import (
|
||||
"sigs.k8s.io/controller-runtime/pkg/reconcile"
|
||||
"sigs.k8s.io/controller-runtime/pkg/source"
|
||||
|
||||
infrav1 "github.com/talos-systems/sidero/app/caps-controller-manager/api/v1alpha3"
|
||||
"github.com/talos-systems/sidero/app/caps-controller-manager/pkg/constants"
|
||||
metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
infrav1 "github.com/siderolabs/sidero/app/caps-controller-manager/api/v1alpha3"
|
||||
"github.com/siderolabs/sidero/app/caps-controller-manager/pkg/constants"
|
||||
metalv1 "github.com/siderolabs/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
)
|
||||
|
||||
var ErrNoServersInServerClass = errors.New("no servers available in serverclass")
|
||||
|
@ -16,8 +16,8 @@ import (
|
||||
"sigs.k8s.io/controller-runtime/pkg/client"
|
||||
"sigs.k8s.io/controller-runtime/pkg/controller"
|
||||
|
||||
infrav1 "github.com/talos-systems/sidero/app/caps-controller-manager/api/v1alpha3"
|
||||
metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
infrav1 "github.com/siderolabs/sidero/app/caps-controller-manager/api/v1alpha3"
|
||||
metalv1 "github.com/siderolabs/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
)
|
||||
|
||||
// ServerBindingReconciler reconciles a ServerBinding object.
|
||||
|
@ -19,7 +19,7 @@ import (
|
||||
logf "sigs.k8s.io/controller-runtime/pkg/log"
|
||||
"sigs.k8s.io/controller-runtime/pkg/log/zap"
|
||||
|
||||
infrastructurev1alpha2 "github.com/talos-systems/sidero/app/caps-controller-manager/api/v1alpha2"
|
||||
infrastructurev1alpha2 "github.com/siderolabs/sidero/app/caps-controller-manager/api/v1alpha2"
|
||||
// +kubebuilder:scaffold:imports
|
||||
)
|
||||
|
||||
@ -33,7 +33,7 @@ var (
|
||||
)
|
||||
|
||||
func TestAPIs(t *testing.T) {
|
||||
t.Skip("Fix or remove: https://github.com/talos-systems/sidero/issues/47")
|
||||
t.Skip("Fix or remove: https://github.com/siderolabs/sidero/issues/47")
|
||||
|
||||
RegisterFailHandler(Fail)
|
||||
|
||||
|
@ -9,7 +9,7 @@ import (
|
||||
"flag"
|
||||
"os"
|
||||
|
||||
debug "github.com/talos-systems/go-debug"
|
||||
debug "github.com/siderolabs/go-debug"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
clientgoscheme "k8s.io/client-go/kubernetes/scheme"
|
||||
cgrecord "k8s.io/client-go/tools/record"
|
||||
@ -20,10 +20,10 @@ import (
|
||||
"sigs.k8s.io/controller-runtime/pkg/controller"
|
||||
"sigs.k8s.io/controller-runtime/pkg/log/zap"
|
||||
|
||||
infrav1alpha2 "github.com/talos-systems/sidero/app/caps-controller-manager/api/v1alpha2"
|
||||
infrav1alpha3 "github.com/talos-systems/sidero/app/caps-controller-manager/api/v1alpha3"
|
||||
"github.com/talos-systems/sidero/app/caps-controller-manager/controllers"
|
||||
metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
infrav1alpha2 "github.com/siderolabs/sidero/app/caps-controller-manager/api/v1alpha2"
|
||||
infrav1alpha3 "github.com/siderolabs/sidero/app/caps-controller-manager/api/v1alpha3"
|
||||
"github.com/siderolabs/sidero/app/caps-controller-manager/controllers"
|
||||
metalv1 "github.com/siderolabs/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
// +kubebuilder:scaffold:imports
|
||||
)
|
||||
|
||||
@ -111,7 +111,6 @@ func main() {
|
||||
|
||||
if err := (&remote.ClusterCacheReconciler{
|
||||
Client: mgr.GetClient(),
|
||||
Log: ctrl.Log.WithName("remote").WithName("ClusterCacheReconciler"),
|
||||
Tracker: tracker,
|
||||
}).SetupWithManager(ctx, mgr, controller.Options{MaxConcurrentReconciles: defaultMaxConcurrentReconciles}); err != nil {
|
||||
setupLog.Error(err, "unable to create controller", "controller", "ClusterCacheReconciler")
|
||||
|
@ -4,4 +4,4 @@
|
||||
|
||||
package v1alpha1
|
||||
|
||||
// +k8s:conversion-gen=github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha2
|
||||
// +k8s:conversion-gen=github.com/siderolabs/sidero/app/sidero-controller-manager/api/v1alpha2
|
||||
|
@ -9,7 +9,7 @@ import (
|
||||
utilconversion "sigs.k8s.io/cluster-api/util/conversion"
|
||||
"sigs.k8s.io/controller-runtime/pkg/conversion"
|
||||
|
||||
metalv1alpha2 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
metalv1alpha2 "github.com/siderolabs/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
)
|
||||
|
||||
// ConvertTo converts this Environment to the Hub version (v1alpha2).
|
||||
|
@ -8,7 +8,7 @@ import (
|
||||
"fmt"
|
||||
"sort"
|
||||
|
||||
"github.com/talos-systems/talos/pkg/machinery/kernel"
|
||||
"github.com/siderolabs/talos/pkg/machinery/kernel"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
|
@ -10,7 +10,7 @@ import (
|
||||
utilconversion "sigs.k8s.io/cluster-api/util/conversion"
|
||||
"sigs.k8s.io/controller-runtime/pkg/conversion"
|
||||
|
||||
metalv1alpha2 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
metalv1alpha2 "github.com/siderolabs/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
)
|
||||
|
||||
// ConvertTo converts this Server to the Hub version (v1alpha2).
|
||||
|
@ -10,8 +10,8 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
metalv1alpha1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha1"
|
||||
metalv1alpha2 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
metalv1alpha1 "github.com/siderolabs/sidero/app/sidero-controller-manager/api/v1alpha1"
|
||||
metalv1alpha2 "github.com/siderolabs/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
)
|
||||
|
||||
func TestServerConvertV1alpha1V1Alpha2(t *testing.T) {
|
||||
|
@ -15,7 +15,7 @@ import (
|
||||
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
|
||||
"sigs.k8s.io/controller-runtime/pkg/client"
|
||||
|
||||
siderotypes "github.com/talos-systems/sidero/app/sidero-controller-manager/pkg/types"
|
||||
siderotypes "github.com/siderolabs/sidero/app/sidero-controller-manager/pkg/types"
|
||||
)
|
||||
|
||||
// BMC defines data about how to talk to the node via ipmitool.
|
||||
|
@ -8,7 +8,7 @@ package v1alpha1_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha1"
|
||||
"github.com/siderolabs/sidero/app/sidero-controller-manager/api/v1alpha1"
|
||||
)
|
||||
|
||||
func Test_PartialEqual(t *testing.T) {
|
||||
|
@ -15,7 +15,7 @@ import (
|
||||
ctrl "sigs.k8s.io/controller-runtime"
|
||||
"sigs.k8s.io/controller-runtime/pkg/webhook"
|
||||
|
||||
siderotypes "github.com/talos-systems/sidero/app/sidero-controller-manager/pkg/types"
|
||||
siderotypes "github.com/siderolabs/sidero/app/sidero-controller-manager/pkg/types"
|
||||
)
|
||||
|
||||
var operations = map[string]struct{}{
|
||||
|
@ -10,7 +10,7 @@ import (
|
||||
utilconversion "sigs.k8s.io/cluster-api/util/conversion"
|
||||
"sigs.k8s.io/controller-runtime/pkg/conversion"
|
||||
|
||||
metalv1alpha2 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
metalv1alpha2 "github.com/siderolabs/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
)
|
||||
|
||||
// ConvertTo converts this ServerClass to the Hub version (v1alpha2).
|
||||
|
@ -10,7 +10,7 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
||||
metalv1alpha1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha1"
|
||||
metalv1alpha1 "github.com/siderolabs/sidero/app/sidero-controller-manager/api/v1alpha1"
|
||||
)
|
||||
|
||||
func TestFilterAcceptedServers(t *testing.T) {
|
||||
|
@ -8,7 +8,7 @@ import (
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
||||
siderotypes "github.com/talos-systems/sidero/app/sidero-controller-manager/pkg/types"
|
||||
siderotypes "github.com/siderolabs/sidero/app/sidero-controller-manager/pkg/types"
|
||||
)
|
||||
|
||||
// ServerClassAny is an automatically created ServerClass that includes all Servers.
|
||||
|
@ -17,8 +17,8 @@ import (
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
v1beta1 "sigs.k8s.io/cluster-api/api/v1beta1"
|
||||
|
||||
v1alpha2 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
types "github.com/talos-systems/sidero/app/sidero-controller-manager/pkg/types"
|
||||
v1alpha2 "github.com/siderolabs/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
types "github.com/siderolabs/sidero/app/sidero-controller-manager/pkg/types"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@ -8,7 +8,7 @@ import (
|
||||
"fmt"
|
||||
"sort"
|
||||
|
||||
"github.com/talos-systems/talos/pkg/machinery/kernel"
|
||||
"github.com/siderolabs/talos/pkg/machinery/kernel"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
|
@ -15,7 +15,7 @@ import (
|
||||
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
|
||||
"sigs.k8s.io/controller-runtime/pkg/client"
|
||||
|
||||
siderotypes "github.com/talos-systems/sidero/app/sidero-controller-manager/pkg/types"
|
||||
siderotypes "github.com/siderolabs/sidero/app/sidero-controller-manager/pkg/types"
|
||||
)
|
||||
|
||||
// BMC defines data about how to talk to the node via ipmitool.
|
||||
|
@ -8,7 +8,7 @@ package v1alpha2_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
metal "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
metal "github.com/siderolabs/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
)
|
||||
|
||||
func Test_PartialEqual(t *testing.T) {
|
||||
|
@ -15,7 +15,7 @@ import (
|
||||
ctrl "sigs.k8s.io/controller-runtime"
|
||||
"sigs.k8s.io/controller-runtime/pkg/webhook"
|
||||
|
||||
siderotypes "github.com/talos-systems/sidero/app/sidero-controller-manager/pkg/types"
|
||||
siderotypes "github.com/siderolabs/sidero/app/sidero-controller-manager/pkg/types"
|
||||
)
|
||||
|
||||
var operations = map[string]struct{}{
|
||||
|
@ -10,7 +10,7 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
||||
metal "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
metal "github.com/siderolabs/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
)
|
||||
|
||||
//nolint:maintidx
|
||||
|
@ -8,7 +8,7 @@ import (
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
||||
siderotypes "github.com/talos-systems/sidero/app/sidero-controller-manager/pkg/types"
|
||||
siderotypes "github.com/siderolabs/sidero/app/sidero-controller-manager/pkg/types"
|
||||
)
|
||||
|
||||
// ServerClassAny is an automatically created ServerClass that includes all Servers.
|
||||
|
@ -17,23 +17,22 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/talos-systems/go-blockdevice/blockdevice"
|
||||
"github.com/talos-systems/go-blockdevice/blockdevice/util/disk"
|
||||
"github.com/talos-systems/go-debug"
|
||||
"github.com/talos-systems/go-kmsg"
|
||||
"github.com/talos-systems/go-procfs/procfs"
|
||||
"github.com/talos-systems/go-retry/retry"
|
||||
"github.com/talos-systems/go-smbios/smbios"
|
||||
talosnet "github.com/talos-systems/net"
|
||||
"github.com/siderolabs/go-blockdevice/blockdevice"
|
||||
"github.com/siderolabs/go-blockdevice/blockdevice/util/disk"
|
||||
"github.com/siderolabs/go-debug"
|
||||
"github.com/siderolabs/go-kmsg"
|
||||
"github.com/siderolabs/go-procfs/procfs"
|
||||
"github.com/siderolabs/go-retry/retry"
|
||||
"github.com/siderolabs/go-smbios/smbios"
|
||||
"golang.org/x/sync/errgroup"
|
||||
"golang.org/x/sys/unix"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/credentials/insecure"
|
||||
|
||||
metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
"github.com/talos-systems/sidero/app/sidero-controller-manager/internal/api"
|
||||
"github.com/talos-systems/sidero/app/sidero-controller-manager/internal/power/ipmi"
|
||||
"github.com/talos-systems/sidero/app/sidero-controller-manager/pkg/constants"
|
||||
metalv1 "github.com/siderolabs/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
"github.com/siderolabs/sidero/app/sidero-controller-manager/internal/api"
|
||||
"github.com/siderolabs/sidero/app/sidero-controller-manager/internal/power/ipmi"
|
||||
"github.com/siderolabs/sidero/app/sidero-controller-manager/pkg/constants"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -248,7 +247,7 @@ func mainFunc() error {
|
||||
|
||||
log.Println("Registration complete")
|
||||
|
||||
ips, err := talosnet.IPAddrs()
|
||||
ips, err := IPAddrs()
|
||||
if err != nil {
|
||||
log.Println("failed to discover IPs")
|
||||
} else {
|
||||
@ -766,3 +765,24 @@ func MapNetworkInformation(s []net.Interface) *api.NetworkInformation {
|
||||
Interfaces: interfaces,
|
||||
}
|
||||
}
|
||||
|
||||
// IPAddrs finds and returns a list of non-loopback IP addresses of the
|
||||
// current machine.
|
||||
func IPAddrs() (ips []net.IP, err error) {
|
||||
ips = []net.IP{}
|
||||
|
||||
addrs, err := net.InterfaceAddrs()
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
for _, a := range addrs {
|
||||
if ipnet, ok := a.(*net.IPNet); ok {
|
||||
if ipnet.IP.IsGlobalUnicast() && !ipnet.IP.IsLinkLocalUnicast() {
|
||||
ips = append(ips, ipnet.IP)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return ips, nil
|
||||
}
|
||||
|
@ -7,22 +7,22 @@ package main
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"net/netip"
|
||||
"strings"
|
||||
|
||||
"go.uber.org/zap"
|
||||
"inet.af/netaddr"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
|
||||
"sigs.k8s.io/cluster-api/util/conditions"
|
||||
"sigs.k8s.io/cluster-api/util/patch"
|
||||
runtimeclient "sigs.k8s.io/controller-runtime/pkg/client"
|
||||
|
||||
sidero "github.com/talos-systems/sidero/app/caps-controller-manager/api/v1alpha3"
|
||||
"github.com/talos-systems/sidero/app/sidero-controller-manager/internal/siderolink"
|
||||
sidero "github.com/siderolabs/sidero/app/caps-controller-manager/api/v1alpha3"
|
||||
"github.com/siderolabs/sidero/app/sidero-controller-manager/internal/siderolink"
|
||||
|
||||
"github.com/talos-systems/siderolink/pkg/events"
|
||||
"github.com/siderolabs/siderolink/pkg/events"
|
||||
|
||||
"github.com/talos-systems/talos/pkg/machinery/api/machine"
|
||||
"github.com/siderolabs/talos/pkg/machinery/api/machine"
|
||||
)
|
||||
|
||||
// Adapter implents gRPC API.
|
||||
@ -56,12 +56,12 @@ func (a *Adapter) HandleEvent(ctx context.Context, event events.Event) error {
|
||||
|
||||
var err error
|
||||
|
||||
ipPort, err := netaddr.ParseIPPort(event.Node)
|
||||
ipPort, err := netip.ParseAddrPort(event.Node)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
ip := ipPort.IP().String()
|
||||
ip := ipPort.Addr().String()
|
||||
|
||||
annotation, _ := a.annotator.Get(ip)
|
||||
|
||||
|
@ -11,7 +11,7 @@ import (
|
||||
ctrl "sigs.k8s.io/controller-runtime"
|
||||
runtimeclient "sigs.k8s.io/controller-runtime/pkg/client"
|
||||
|
||||
sidero "github.com/talos-systems/sidero/app/caps-controller-manager/api/v1alpha3"
|
||||
sidero "github.com/siderolabs/sidero/app/caps-controller-manager/api/v1alpha3"
|
||||
)
|
||||
|
||||
func getMetalClient() (runtimeclient.Client, *rest.Config, error) {
|
||||
|
@ -14,13 +14,16 @@ import (
|
||||
"os/signal"
|
||||
"syscall"
|
||||
|
||||
"github.com/siderolabs/talos/pkg/machinery/api/machine"
|
||||
"go.uber.org/zap"
|
||||
"golang.org/x/sync/errgroup"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/protobuf/reflect/protoreflect"
|
||||
|
||||
"github.com/talos-systems/sidero/app/sidero-controller-manager/internal/siderolink"
|
||||
"github.com/talos-systems/siderolink/api/events"
|
||||
sink "github.com/talos-systems/siderolink/pkg/events"
|
||||
"github.com/siderolabs/siderolink/api/events"
|
||||
sink "github.com/siderolabs/siderolink/pkg/events"
|
||||
|
||||
"github.com/siderolabs/sidero/app/sidero-controller-manager/internal/siderolink"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@ -67,7 +70,17 @@ func run() error {
|
||||
logger.With(zap.String("component", "sink")),
|
||||
)
|
||||
|
||||
srv := sink.NewSink(adapter)
|
||||
srv := sink.NewSink(adapter,
|
||||
[]protoreflect.ProtoMessage{
|
||||
&machine.AddressEvent{},
|
||||
&machine.ConfigValidationErrorEvent{},
|
||||
&machine.ConfigLoadErrorEvent{},
|
||||
&machine.PhaseEvent{},
|
||||
&machine.TaskEvent{},
|
||||
&machine.ServiceStateEvent{},
|
||||
&machine.SequenceEvent{},
|
||||
},
|
||||
)
|
||||
|
||||
events.RegisterEventSinkServiceServer(s, srv)
|
||||
|
||||
|
@ -6,17 +6,17 @@ package main
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"net/netip"
|
||||
"os"
|
||||
|
||||
"go.uber.org/zap"
|
||||
"inet.af/netaddr"
|
||||
|
||||
"github.com/talos-systems/sidero/app/sidero-controller-manager/internal/siderolink"
|
||||
"github.com/talos-systems/siderolink/pkg/logreceiver"
|
||||
"github.com/siderolabs/sidero/app/sidero-controller-manager/internal/siderolink"
|
||||
"github.com/siderolabs/siderolink/pkg/logreceiver"
|
||||
)
|
||||
|
||||
func logHandler(logger *zap.Logger, annotator *siderolink.Annotator) logreceiver.Handler {
|
||||
return func(srcAddr netaddr.IP, msg map[string]interface{}) {
|
||||
return func(srcAddr netip.Addr, msg map[string]interface{}) {
|
||||
annotation, _ := annotator.Get(srcAddr.String())
|
||||
|
||||
if annotation.ServerUUID != "" {
|
||||
|
@ -11,7 +11,7 @@ import (
|
||||
ctrl "sigs.k8s.io/controller-runtime"
|
||||
runtimeclient "sigs.k8s.io/controller-runtime/pkg/client"
|
||||
|
||||
sidero "github.com/talos-systems/sidero/app/caps-controller-manager/api/v1alpha3"
|
||||
sidero "github.com/siderolabs/sidero/app/caps-controller-manager/api/v1alpha3"
|
||||
)
|
||||
|
||||
func getMetalClient() (runtimeclient.Client, *rest.Config, error) {
|
||||
|
@ -16,8 +16,8 @@ import (
|
||||
"go.uber.org/zap"
|
||||
"golang.org/x/sync/errgroup"
|
||||
|
||||
"github.com/talos-systems/sidero/app/sidero-controller-manager/internal/siderolink"
|
||||
"github.com/talos-systems/siderolink/pkg/logreceiver"
|
||||
"github.com/siderolabs/sidero/app/sidero-controller-manager/internal/siderolink"
|
||||
"github.com/siderolabs/siderolink/pkg/logreceiver"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
@ -11,7 +11,7 @@ import (
|
||||
ctrl "sigs.k8s.io/controller-runtime"
|
||||
runtimeclient "sigs.k8s.io/controller-runtime/pkg/client"
|
||||
|
||||
sidero "github.com/talos-systems/sidero/app/caps-controller-manager/api/v1alpha3"
|
||||
sidero "github.com/siderolabs/sidero/app/caps-controller-manager/api/v1alpha3"
|
||||
)
|
||||
|
||||
func getMetalClient() (runtimeclient.Client, *rest.Config, error) {
|
||||
|
@ -11,6 +11,7 @@ import (
|
||||
"fmt"
|
||||
"log"
|
||||
"net"
|
||||
"net/netip"
|
||||
"os"
|
||||
"os/signal"
|
||||
"syscall"
|
||||
@ -24,13 +25,12 @@ import (
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
"inet.af/netaddr"
|
||||
|
||||
pb "github.com/talos-systems/siderolink/api/siderolink"
|
||||
"github.com/talos-systems/siderolink/pkg/wireguard"
|
||||
pb "github.com/siderolabs/siderolink/api/siderolink"
|
||||
"github.com/siderolabs/siderolink/pkg/wireguard"
|
||||
|
||||
"github.com/talos-systems/sidero/app/sidero-controller-manager/internal/siderolink"
|
||||
"github.com/talos-systems/sidero/app/sidero-controller-manager/pkg/constants"
|
||||
"github.com/siderolabs/sidero/app/sidero-controller-manager/internal/siderolink"
|
||||
"github.com/siderolabs/sidero/app/sidero-controller-manager/pkg/constants"
|
||||
)
|
||||
|
||||
var (
|
||||
@ -111,12 +111,12 @@ func run() error {
|
||||
return err
|
||||
}
|
||||
|
||||
wireguardEndpoint, err := netaddr.ParseIPPort(siderolink.Cfg.WireguardEndpoint)
|
||||
wireguardEndpoint, err := netip.ParseAddrPort(siderolink.Cfg.WireguardEndpoint)
|
||||
if err != nil {
|
||||
return fmt.Errorf("invalid Wireguard endpoint: %w", err)
|
||||
}
|
||||
|
||||
wgDevice, err := wireguard.NewDevice(siderolink.Cfg.ServerAddress, siderolink.Cfg.PrivateKey, wireguardEndpoint.Port())
|
||||
wgDevice, err := wireguard.NewDevice(siderolink.Cfg.ServerAddress, siderolink.Cfg.PrivateKey, wireguardEndpoint.Port(), false, logger)
|
||||
if err != nil {
|
||||
return fmt.Errorf("error initializing wgDevice: %w", err)
|
||||
}
|
||||
@ -175,7 +175,7 @@ func run() error {
|
||||
}
|
||||
|
||||
func getIPForHost(host string) (string, error) {
|
||||
parsedIP, err := netaddr.ParseIP(host)
|
||||
parsedIP, err := netip.ParseAddr(host)
|
||||
if err == nil {
|
||||
return parsedIP.String(), nil
|
||||
}
|
||||
|
@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.9.2
|
||||
controller-gen.kubebuilder.io/version: v0.10.0
|
||||
creationTimestamp: null
|
||||
name: environments.metal.sidero.dev
|
||||
spec:
|
||||
|
@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.9.2
|
||||
controller-gen.kubebuilder.io/version: v0.10.0
|
||||
creationTimestamp: null
|
||||
name: serverclasses.metal.sidero.dev
|
||||
spec:
|
||||
|
@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.9.2
|
||||
controller-gen.kubebuilder.io/version: v0.10.0
|
||||
creationTimestamp: null
|
||||
name: servers.metal.sidero.dev
|
||||
spec:
|
||||
@ -170,29 +170,30 @@ spec:
|
||||
type: string
|
||||
type: object
|
||||
environmentRef:
|
||||
description: 'ObjectReference contains enough information to let you
|
||||
description: "ObjectReference contains enough information to let you
|
||||
inspect or modify the referred object. --- New uses of this type
|
||||
are discouraged because of difficulty describing its usage when
|
||||
embedded in APIs. 1. Ignored fields. It includes many fields which
|
||||
are not generally honored. For instance, ResourceVersion and FieldPath
|
||||
are both very rarely valid in actual usage. 2. Invalid usage help. It
|
||||
is impossible to add specific help for individual usage. In most
|
||||
embedded usages, there are particular restrictions like, "must refer
|
||||
only to types A and B" or "UID not honored" or "name must be restricted".
|
||||
Those cannot be well described when embedded. 3. Inconsistent validation. Because
|
||||
the usages are different, the validation rules are different by
|
||||
usage, which makes it hard for users to predict what will happen.
|
||||
4. The fields are both imprecise and overly precise. Kind is not
|
||||
a precise mapping to a URL. This can produce ambiguity during interpretation
|
||||
and require a REST mapping. In most cases, the dependency is on
|
||||
the group,resource tuple and the version of the actual struct is
|
||||
irrelevant. 5. We cannot easily change it. Because this type is
|
||||
embedded in many locations, updates to this type will affect numerous
|
||||
schemas. Don''t make new APIs embed an underspecified API type
|
||||
they do not control. Instead of using this type, create a locally
|
||||
provided and used type that is well-focused on your reference. For
|
||||
example, ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533
|
||||
.'
|
||||
are both very rarely valid in actual usage. 2. Invalid usage help.
|
||||
\ It is impossible to add specific help for individual usage. In
|
||||
most embedded usages, there are particular restrictions like, \"must
|
||||
refer only to types A and B\" or \"UID not honored\" or \"name must
|
||||
be restricted\". Those cannot be well described when embedded. 3.
|
||||
Inconsistent validation. Because the usages are different, the
|
||||
validation rules are different by usage, which makes it hard for
|
||||
users to predict what will happen. 4. The fields are both imprecise
|
||||
and overly precise. Kind is not a precise mapping to a URL. This
|
||||
can produce ambiguity during interpretation and require a REST mapping.
|
||||
\ In most cases, the dependency is on the group,resource tuple and
|
||||
the version of the actual struct is irrelevant. 5. We cannot easily
|
||||
change it. Because this type is embedded in many locations, updates
|
||||
to this type will affect numerous schemas. Don't make new APIs
|
||||
embed an underspecified API type they do not control. \n Instead
|
||||
of using this type, create a locally provided and used type that
|
||||
is well-focused on your reference. For example, ServiceReferences
|
||||
for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533
|
||||
."
|
||||
properties:
|
||||
apiVersion:
|
||||
description: API version of the referent.
|
||||
@ -496,29 +497,30 @@ spec:
|
||||
cordoned:
|
||||
type: boolean
|
||||
environmentRef:
|
||||
description: 'ObjectReference contains enough information to let you
|
||||
description: "ObjectReference contains enough information to let you
|
||||
inspect or modify the referred object. --- New uses of this type
|
||||
are discouraged because of difficulty describing its usage when
|
||||
embedded in APIs. 1. Ignored fields. It includes many fields which
|
||||
are not generally honored. For instance, ResourceVersion and FieldPath
|
||||
are both very rarely valid in actual usage. 2. Invalid usage help. It
|
||||
is impossible to add specific help for individual usage. In most
|
||||
embedded usages, there are particular restrictions like, "must refer
|
||||
only to types A and B" or "UID not honored" or "name must be restricted".
|
||||
Those cannot be well described when embedded. 3. Inconsistent validation. Because
|
||||
the usages are different, the validation rules are different by
|
||||
usage, which makes it hard for users to predict what will happen.
|
||||
4. The fields are both imprecise and overly precise. Kind is not
|
||||
a precise mapping to a URL. This can produce ambiguity during interpretation
|
||||
and require a REST mapping. In most cases, the dependency is on
|
||||
the group,resource tuple and the version of the actual struct is
|
||||
irrelevant. 5. We cannot easily change it. Because this type is
|
||||
embedded in many locations, updates to this type will affect numerous
|
||||
schemas. Don''t make new APIs embed an underspecified API type
|
||||
they do not control. Instead of using this type, create a locally
|
||||
provided and used type that is well-focused on your reference. For
|
||||
example, ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533
|
||||
.'
|
||||
are both very rarely valid in actual usage. 2. Invalid usage help.
|
||||
\ It is impossible to add specific help for individual usage. In
|
||||
most embedded usages, there are particular restrictions like, \"must
|
||||
refer only to types A and B\" or \"UID not honored\" or \"name must
|
||||
be restricted\". Those cannot be well described when embedded. 3.
|
||||
Inconsistent validation. Because the usages are different, the
|
||||
validation rules are different by usage, which makes it hard for
|
||||
users to predict what will happen. 4. The fields are both imprecise
|
||||
and overly precise. Kind is not a precise mapping to a URL. This
|
||||
can produce ambiguity during interpretation and require a REST mapping.
|
||||
\ In most cases, the dependency is on the group,resource tuple and
|
||||
the version of the actual struct is irrelevant. 5. We cannot easily
|
||||
change it. Because this type is embedded in many locations, updates
|
||||
to this type will affect numerous schemas. Don't make new APIs
|
||||
embed an underspecified API type they do not control. \n Instead
|
||||
of using this type, create a locally provided and used type that
|
||||
is well-focused on your reference. For example, ServiceReferences
|
||||
for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533
|
||||
."
|
||||
properties:
|
||||
apiVersion:
|
||||
description: API version of the referent.
|
||||
|
@ -24,8 +24,8 @@ import (
|
||||
"sigs.k8s.io/controller-runtime/pkg/client"
|
||||
"sigs.k8s.io/controller-runtime/pkg/controller"
|
||||
|
||||
metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
"github.com/talos-systems/sidero/app/sidero-controller-manager/pkg/constants"
|
||||
metalv1 "github.com/siderolabs/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
"github.com/siderolabs/sidero/app/sidero-controller-manager/pkg/constants"
|
||||
)
|
||||
|
||||
// EnvironmentReconciler reconciles a Environment object.
|
||||
|
@ -29,11 +29,11 @@ import (
|
||||
"sigs.k8s.io/controller-runtime/pkg/reconcile"
|
||||
"sigs.k8s.io/controller-runtime/pkg/source"
|
||||
|
||||
infrav1 "github.com/talos-systems/sidero/app/caps-controller-manager/api/v1alpha3"
|
||||
metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
"github.com/talos-systems/sidero/app/sidero-controller-manager/internal/power"
|
||||
"github.com/talos-systems/sidero/app/sidero-controller-manager/pkg/constants"
|
||||
siderotypes "github.com/talos-systems/sidero/app/sidero-controller-manager/pkg/types"
|
||||
infrav1 "github.com/siderolabs/sidero/app/caps-controller-manager/api/v1alpha3"
|
||||
metalv1 "github.com/siderolabs/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
"github.com/siderolabs/sidero/app/sidero-controller-manager/internal/power"
|
||||
"github.com/siderolabs/sidero/app/sidero-controller-manager/pkg/constants"
|
||||
siderotypes "github.com/siderolabs/sidero/app/sidero-controller-manager/pkg/types"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -20,7 +20,7 @@ import (
|
||||
"sigs.k8s.io/controller-runtime/pkg/reconcile"
|
||||
"sigs.k8s.io/controller-runtime/pkg/source"
|
||||
|
||||
metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
metalv1 "github.com/siderolabs/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
)
|
||||
|
||||
// ServerClassReconciler reconciles a ServerClass object.
|
||||
|
@ -18,7 +18,7 @@ import (
|
||||
logf "sigs.k8s.io/controller-runtime/pkg/log"
|
||||
"sigs.k8s.io/controller-runtime/pkg/log/zap"
|
||||
|
||||
metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
metalv1 "github.com/siderolabs/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
// +kubebuilder:scaffold:imports
|
||||
)
|
||||
|
||||
@ -32,7 +32,7 @@ var (
|
||||
)
|
||||
|
||||
func TestAPIs(t *testing.T) {
|
||||
t.Skip("Fix or remove: https://github.com/talos-systems/sidero/issues/47")
|
||||
t.Skip("Fix or remove: https://github.com/siderolabs/sidero/issues/47")
|
||||
|
||||
RegisterFailHandler(Fail)
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.27.1
|
||||
// protoc v3.19.1
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc v3.21.9
|
||||
// source: api.proto
|
||||
|
||||
package api
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.1.0
|
||||
// - protoc v3.19.1
|
||||
// - protoc-gen-go-grpc v1.2.0
|
||||
// - protoc v3.21.9
|
||||
// source: api.proto
|
||||
|
||||
package api
|
||||
|
@ -27,15 +27,15 @@ import (
|
||||
"sigs.k8s.io/controller-runtime/pkg/client"
|
||||
"sigs.k8s.io/controller-runtime/pkg/healthz"
|
||||
|
||||
"github.com/talos-systems/go-procfs/procfs"
|
||||
talosconstants "github.com/talos-systems/talos/pkg/machinery/constants"
|
||||
"github.com/talos-systems/talos/pkg/machinery/kernel"
|
||||
"github.com/siderolabs/go-procfs/procfs"
|
||||
talosconstants "github.com/siderolabs/talos/pkg/machinery/constants"
|
||||
"github.com/siderolabs/talos/pkg/machinery/kernel"
|
||||
|
||||
infrav1 "github.com/talos-systems/sidero/app/caps-controller-manager/api/v1alpha3"
|
||||
metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
"github.com/talos-systems/sidero/app/sidero-controller-manager/internal/siderolink"
|
||||
"github.com/talos-systems/sidero/app/sidero-controller-manager/pkg/constants"
|
||||
siderotypes "github.com/talos-systems/sidero/app/sidero-controller-manager/pkg/types"
|
||||
infrav1 "github.com/siderolabs/sidero/app/caps-controller-manager/api/v1alpha3"
|
||||
metalv1 "github.com/siderolabs/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
"github.com/siderolabs/sidero/app/sidero-controller-manager/internal/siderolink"
|
||||
"github.com/siderolabs/sidero/app/sidero-controller-manager/pkg/constants"
|
||||
siderotypes "github.com/siderolabs/sidero/app/sidero-controller-manager/pkg/types"
|
||||
)
|
||||
|
||||
var ErrBootFromDisk = errors.New("boot from disk")
|
||||
@ -524,12 +524,12 @@ outer:
|
||||
case logDeliveryPrefix:
|
||||
// patch environment with the log receiver endpoint
|
||||
env.Spec.Kernel.Args = append(env.Spec.Kernel.Args,
|
||||
fmt.Sprintf("%s=tcp://[%s]:%d", talosconstants.KernelParamLoggingKernel, siderolink.Cfg.ServerAddress.IP(), siderolink.LogReceiverPort),
|
||||
fmt.Sprintf("%s=tcp://[%s]:%d", talosconstants.KernelParamLoggingKernel, siderolink.Cfg.ServerAddress.Addr(), siderolink.LogReceiverPort),
|
||||
)
|
||||
case eventsSinkPrefix:
|
||||
// patch environment with the events sink endpoint
|
||||
env.Spec.Kernel.Args = append(env.Spec.Kernel.Args,
|
||||
fmt.Sprintf("%s=[%s]:%d", talosconstants.KernelParamEventsSink, siderolink.Cfg.ServerAddress.IP(), siderolink.EventsSinkPort),
|
||||
fmt.Sprintf("%s=[%s]:%d", talosconstants.KernelParamEventsSink, siderolink.Cfg.ServerAddress.Addr(), siderolink.EventsSinkPort),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/talos-systems/sidero/app/sidero-controller-manager/internal/ipxe"
|
||||
"github.com/siderolabs/sidero/app/sidero-controller-manager/internal/ipxe"
|
||||
)
|
||||
|
||||
func TestEmbeddedLength(t *testing.T) {
|
||||
|
@ -13,16 +13,16 @@ import (
|
||||
|
||||
jsonpatch "github.com/evanphx/json-patch"
|
||||
"github.com/ghodss/yaml"
|
||||
"github.com/talos-systems/talos/pkg/machinery/config/configloader"
|
||||
talosv1alpha1 "github.com/talos-systems/talos/pkg/machinery/config/types/v1alpha1" //nolint:typecheck
|
||||
"github.com/siderolabs/talos/pkg/machinery/config/configloader"
|
||||
talosv1alpha1 "github.com/siderolabs/talos/pkg/machinery/config/types/v1alpha1" //nolint:typecheck
|
||||
v1 "k8s.io/api/core/v1"
|
||||
apierrors "k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
"sigs.k8s.io/cluster-api/util"
|
||||
runtimeclient "sigs.k8s.io/controller-runtime/pkg/client"
|
||||
|
||||
infrav1 "github.com/talos-systems/sidero/app/caps-controller-manager/api/v1alpha3"
|
||||
metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
infrav1 "github.com/siderolabs/sidero/app/caps-controller-manager/api/v1alpha3"
|
||||
metalv1 "github.com/siderolabs/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
)
|
||||
|
||||
type errorWithCode struct {
|
||||
|
@ -13,8 +13,8 @@ import (
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
"github.com/talos-systems/sidero/app/sidero-controller-manager/pkg/types"
|
||||
metalv1 "github.com/siderolabs/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
"github.com/siderolabs/sidero/app/sidero-controller-manager/pkg/types"
|
||||
)
|
||||
|
||||
// Client provides management over simple API.
|
||||
|
@ -10,11 +10,11 @@ import (
|
||||
|
||||
"sigs.k8s.io/controller-runtime/pkg/client"
|
||||
|
||||
metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
"github.com/talos-systems/sidero/app/sidero-controller-manager/internal/power/api"
|
||||
"github.com/talos-systems/sidero/app/sidero-controller-manager/internal/power/ipmi"
|
||||
"github.com/talos-systems/sidero/app/sidero-controller-manager/internal/power/metal"
|
||||
"github.com/talos-systems/sidero/app/sidero-controller-manager/pkg/constants"
|
||||
metalv1 "github.com/siderolabs/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
"github.com/siderolabs/sidero/app/sidero-controller-manager/internal/power/api"
|
||||
"github.com/siderolabs/sidero/app/sidero-controller-manager/internal/power/ipmi"
|
||||
"github.com/siderolabs/sidero/app/sidero-controller-manager/internal/power/metal"
|
||||
"github.com/siderolabs/sidero/app/sidero-controller-manager/pkg/constants"
|
||||
)
|
||||
|
||||
// NewManagementClient builds ManagementClient from the server spec.
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
package power
|
||||
|
||||
import "github.com/talos-systems/sidero/app/sidero-controller-manager/pkg/types"
|
||||
import "github.com/siderolabs/sidero/app/sidero-controller-manager/pkg/types"
|
||||
|
||||
type fakeClient struct{}
|
||||
|
||||
|
@ -9,8 +9,8 @@ import (
|
||||
|
||||
goipmi "github.com/pensando/goipmi"
|
||||
|
||||
metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
"github.com/talos-systems/sidero/app/sidero-controller-manager/pkg/types"
|
||||
metalv1 "github.com/siderolabs/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
"github.com/siderolabs/sidero/app/sidero-controller-manager/pkg/types"
|
||||
)
|
||||
|
||||
// Link to the IPMI spec: https://www.intel.com/content/dam/www/public/us/en/documents/product-briefs/ipmi-second-gen-interface-spec-v2-rev1-1.pdf
|
||||
|
@ -5,7 +5,7 @@
|
||||
// Package metal provides interfaces to manage metal machines.
|
||||
package metal
|
||||
|
||||
import "github.com/talos-systems/sidero/app/sidero-controller-manager/pkg/types"
|
||||
import "github.com/siderolabs/sidero/app/sidero-controller-manager/pkg/types"
|
||||
|
||||
// ManagementClient control power and boot order of metal machine.
|
||||
type ManagementClient interface {
|
||||
|
@ -9,14 +9,14 @@ import (
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/talos-systems/grpc-proxy/proxy"
|
||||
"github.com/siderolabs/grpc-proxy/proxy"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/credentials/insecure"
|
||||
"google.golang.org/grpc/metadata"
|
||||
"google.golang.org/grpc/status"
|
||||
|
||||
"github.com/talos-systems/sidero/app/sidero-controller-manager/pkg/constants"
|
||||
"github.com/siderolabs/sidero/app/sidero-controller-manager/pkg/constants"
|
||||
)
|
||||
|
||||
// director proxy passes gRPC APIs to sub-components based on API method name.
|
||||
@ -42,7 +42,7 @@ func (b *backend) String() string {
|
||||
}
|
||||
|
||||
// GetConnection returns a grpc connection to the backend.
|
||||
func (b *backend) GetConnection(ctx context.Context) (context.Context, *grpc.ClientConn, error) {
|
||||
func (b *backend) GetConnection(ctx context.Context, _ string) (context.Context, *grpc.ClientConn, error) {
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
|
||||
outCtx := metadata.NewOutgoingContext(ctx, md)
|
||||
|
@ -11,7 +11,7 @@ import (
|
||||
"reflect"
|
||||
"time"
|
||||
|
||||
"github.com/talos-systems/grpc-proxy/proxy"
|
||||
"github.com/siderolabs/grpc-proxy/proxy"
|
||||
"google.golang.org/grpc"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
apierrors "k8s.io/apimachinery/pkg/api/errors"
|
||||
@ -26,9 +26,9 @@ import (
|
||||
"sigs.k8s.io/cluster-api/util/patch"
|
||||
controllerclient "sigs.k8s.io/controller-runtime/pkg/client"
|
||||
|
||||
metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
"github.com/talos-systems/sidero/app/sidero-controller-manager/internal/api"
|
||||
"github.com/talos-systems/sidero/app/sidero-controller-manager/pkg/constants"
|
||||
metalv1 "github.com/siderolabs/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
"github.com/siderolabs/sidero/app/sidero-controller-manager/internal/api"
|
||||
"github.com/siderolabs/sidero/app/sidero-controller-manager/pkg/constants"
|
||||
)
|
||||
|
||||
type server struct {
|
||||
|
@ -7,11 +7,11 @@ package siderolink
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"net/netip"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"go.uber.org/zap"
|
||||
"inet.af/netaddr"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
@ -23,7 +23,7 @@ import (
|
||||
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
|
||||
runtimeclient "sigs.k8s.io/controller-runtime/pkg/client"
|
||||
|
||||
sidero "github.com/talos-systems/sidero/app/caps-controller-manager/api/v1alpha3"
|
||||
sidero "github.com/siderolabs/sidero/app/caps-controller-manager/api/v1alpha3"
|
||||
)
|
||||
|
||||
// Annotation describes the source server by SideroLink IP address.
|
||||
@ -133,13 +133,13 @@ func (a *Annotator) notify(old, new interface{}) {
|
||||
return
|
||||
}
|
||||
|
||||
ipPrefix, err := netaddr.ParseIPPrefix(address)
|
||||
ipPrefix, err := netip.ParsePrefix(address)
|
||||
if err != nil {
|
||||
a.logger.Error("failure parsing siderolink address", zap.Error(err))
|
||||
return
|
||||
}
|
||||
|
||||
address = ipPrefix.IP().String()
|
||||
address = ipPrefix.Addr().String()
|
||||
|
||||
if oldServerBinding != nil {
|
||||
delete(a.nodes, oldServerBinding.Spec.SideroLink.NodeAddress)
|
||||
|
@ -7,9 +7,9 @@ package siderolink
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"net/netip"
|
||||
|
||||
"golang.zx2c4.com/wireguard/wgctrl/wgtypes"
|
||||
"inet.af/netaddr"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
apierrors "k8s.io/apimachinery/pkg/api/errors"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
@ -17,7 +17,7 @@ import (
|
||||
clusterctl "sigs.k8s.io/cluster-api/cmd/clusterctl/api/v1alpha3"
|
||||
runtimeclient "sigs.k8s.io/controller-runtime/pkg/client"
|
||||
|
||||
"github.com/talos-systems/siderolink/pkg/wireguard"
|
||||
"github.com/siderolabs/siderolink/pkg/wireguard"
|
||||
)
|
||||
|
||||
// Config is the internal SideroLink configuration.
|
||||
@ -26,8 +26,8 @@ type Config struct {
|
||||
PrivateKey wgtypes.Key
|
||||
PublicKey wgtypes.Key
|
||||
WireguardEndpoint string
|
||||
Subnet netaddr.IPPrefix
|
||||
ServerAddress netaddr.IPPrefix
|
||||
Subnet netip.Prefix
|
||||
ServerAddress netip.Prefix
|
||||
}
|
||||
|
||||
const (
|
||||
@ -130,5 +130,5 @@ func (cfg *Config) fill() {
|
||||
cfg.PublicKey = cfg.PrivateKey.PublicKey()
|
||||
|
||||
cfg.Subnet = wireguard.NetworkPrefix(cfg.InstallationID)
|
||||
cfg.ServerAddress = netaddr.IPPrefixFrom(cfg.Subnet.IP().Next(), cfg.Subnet.Bits())
|
||||
cfg.ServerAddress = netip.PrefixFrom(cfg.Subnet.Addr().Next(), cfg.Subnet.Bits())
|
||||
}
|
||||
|
@ -6,11 +6,11 @@ package siderolink
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/netip"
|
||||
"time"
|
||||
|
||||
"go.uber.org/zap"
|
||||
"golang.zx2c4.com/wireguard/wgctrl/wgtypes"
|
||||
"inet.af/netaddr"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/client-go/dynamic"
|
||||
@ -18,8 +18,8 @@ import (
|
||||
"k8s.io/client-go/rest"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
|
||||
sidero "github.com/talos-systems/sidero/app/caps-controller-manager/api/v1alpha3"
|
||||
"github.com/talos-systems/siderolink/pkg/wireguard"
|
||||
sidero "github.com/siderolabs/sidero/app/caps-controller-manager/api/v1alpha3"
|
||||
"github.com/siderolabs/siderolink/pkg/wireguard"
|
||||
)
|
||||
|
||||
// PeerState syncs data from Kubernetes ServerBinding as peer state.
|
||||
@ -114,7 +114,7 @@ func (peers *PeerState) buildEvent(serverBinding *sidero.ServerBinding, deleted
|
||||
return
|
||||
}
|
||||
|
||||
address, err := netaddr.ParseIPPrefix(serverBinding.Spec.SideroLink.NodeAddress)
|
||||
address, err := netip.ParsePrefix(serverBinding.Spec.SideroLink.NodeAddress)
|
||||
if err != nil {
|
||||
peers.logger.Error("error parsing node address", zap.Error(err), zap.String("uuid", serverBinding.Name))
|
||||
|
||||
@ -131,7 +131,7 @@ func (peers *PeerState) buildEvent(serverBinding *sidero.ServerBinding, deleted
|
||||
peers.eventCh <- wireguard.PeerEvent{
|
||||
PubKey: pubKey,
|
||||
Remove: deleted,
|
||||
Address: address.IP(),
|
||||
Address: address.Addr(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -9,19 +9,19 @@ import (
|
||||
"crypto/rand"
|
||||
"fmt"
|
||||
"io"
|
||||
"net/netip"
|
||||
|
||||
"golang.zx2c4.com/wireguard/wgctrl/wgtypes"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
"inet.af/netaddr"
|
||||
apierrors "k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
"sigs.k8s.io/cluster-api/util/patch"
|
||||
runtimeclient "sigs.k8s.io/controller-runtime/pkg/client"
|
||||
|
||||
pb "github.com/talos-systems/siderolink/api/siderolink"
|
||||
pb "github.com/siderolabs/siderolink/api/siderolink"
|
||||
|
||||
sidero "github.com/talos-systems/sidero/app/caps-controller-manager/api/v1alpha3"
|
||||
sidero "github.com/siderolabs/sidero/app/caps-controller-manager/api/v1alpha3"
|
||||
)
|
||||
|
||||
// Server implements gRPC API.
|
||||
@ -57,17 +57,17 @@ func (srv *Server) Provision(ctx context.Context, req *pb.ProvisionRequest) (*pb
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var nodeAddress netaddr.IPPrefix
|
||||
var nodeAddress netip.Prefix
|
||||
|
||||
if serverbinding.Spec.SideroLink.NodeAddress != "" {
|
||||
// find already provisioned address
|
||||
nodeAddress, err = netaddr.ParseIPPrefix(serverbinding.Spec.SideroLink.NodeAddress)
|
||||
nodeAddress, err = netip.ParsePrefix(serverbinding.Spec.SideroLink.NodeAddress)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
} else {
|
||||
// generate random address for the node
|
||||
raw := srv.cfg.Subnet.IP().As16()
|
||||
raw := srv.cfg.Subnet.Addr().As16()
|
||||
salt := make([]byte, 8)
|
||||
|
||||
_, err := io.ReadFull(rand.Reader, salt)
|
||||
@ -77,7 +77,7 @@ func (srv *Server) Provision(ctx context.Context, req *pb.ProvisionRequest) (*pb
|
||||
|
||||
copy(raw[8:], salt)
|
||||
|
||||
nodeAddress = netaddr.IPPrefixFrom(netaddr.IPFrom16(raw), srv.cfg.Subnet.Bits())
|
||||
nodeAddress = netip.PrefixFrom(netip.AddrFrom16(raw), srv.cfg.Subnet.Bits())
|
||||
|
||||
serverbinding.Spec.SideroLink.NodeAddress = nodeAddress.String()
|
||||
}
|
||||
@ -96,7 +96,7 @@ func (srv *Server) Provision(ctx context.Context, req *pb.ProvisionRequest) (*pb
|
||||
return &pb.ProvisionResponse{
|
||||
ServerEndpoint: srv.cfg.WireguardEndpoint,
|
||||
ServerPublicKey: srv.cfg.PublicKey.String(),
|
||||
ServerAddress: srv.cfg.ServerAddress.IP().String(),
|
||||
ServerAddress: srv.cfg.ServerAddress.Addr().String(),
|
||||
NodeAddressPrefix: nodeAddress.String(),
|
||||
}, nil
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
debug "github.com/talos-systems/go-debug"
|
||||
debug "github.com/siderolabs/go-debug"
|
||||
"golang.org/x/net/http2"
|
||||
"golang.org/x/net/http2/h2c"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
@ -30,18 +30,18 @@ import (
|
||||
"sigs.k8s.io/controller-runtime/pkg/log/zap"
|
||||
"sigs.k8s.io/controller-runtime/pkg/manager"
|
||||
|
||||
infrav1alpha3 "github.com/talos-systems/sidero/app/caps-controller-manager/api/v1alpha3"
|
||||
metalv1alpha1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha1"
|
||||
metalv1alpha2 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
"github.com/talos-systems/sidero/app/sidero-controller-manager/controllers"
|
||||
"github.com/talos-systems/sidero/app/sidero-controller-manager/internal/ipxe"
|
||||
"github.com/talos-systems/sidero/app/sidero-controller-manager/internal/metadata"
|
||||
"github.com/talos-systems/sidero/app/sidero-controller-manager/internal/power/api"
|
||||
"github.com/talos-systems/sidero/app/sidero-controller-manager/internal/server"
|
||||
"github.com/talos-systems/sidero/app/sidero-controller-manager/internal/siderolink"
|
||||
"github.com/talos-systems/sidero/app/sidero-controller-manager/internal/tftp"
|
||||
"github.com/talos-systems/sidero/app/sidero-controller-manager/pkg/constants"
|
||||
siderotypes "github.com/talos-systems/sidero/app/sidero-controller-manager/pkg/types"
|
||||
infrav1alpha3 "github.com/siderolabs/sidero/app/caps-controller-manager/api/v1alpha3"
|
||||
metalv1alpha1 "github.com/siderolabs/sidero/app/sidero-controller-manager/api/v1alpha1"
|
||||
metalv1alpha2 "github.com/siderolabs/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
"github.com/siderolabs/sidero/app/sidero-controller-manager/controllers"
|
||||
"github.com/siderolabs/sidero/app/sidero-controller-manager/internal/ipxe"
|
||||
"github.com/siderolabs/sidero/app/sidero-controller-manager/internal/metadata"
|
||||
"github.com/siderolabs/sidero/app/sidero-controller-manager/internal/power/api"
|
||||
"github.com/siderolabs/sidero/app/sidero-controller-manager/internal/server"
|
||||
"github.com/siderolabs/sidero/app/sidero-controller-manager/internal/siderolink"
|
||||
"github.com/siderolabs/sidero/app/sidero-controller-manager/internal/tftp"
|
||||
"github.com/siderolabs/sidero/app/sidero-controller-manager/pkg/constants"
|
||||
siderotypes "github.com/siderolabs/sidero/app/sidero-controller-manager/pkg/types"
|
||||
// +kubebuilder:scaffold:imports
|
||||
)
|
||||
|
||||
|
132
go.mod
132
go.mod
@ -1,4 +1,4 @@
|
||||
module github.com/talos-systems/sidero
|
||||
module github.com/siderolabs/sidero
|
||||
|
||||
go 1.19
|
||||
|
||||
@ -8,122 +8,116 @@ require (
|
||||
github.com/evanphx/json-patch v5.6.0+incompatible
|
||||
github.com/ghodss/yaml v1.0.0
|
||||
github.com/go-logr/logr v1.2.3
|
||||
github.com/google/go-cmp v0.5.8
|
||||
github.com/google/go-cmp v0.5.9
|
||||
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0
|
||||
github.com/hashicorp/go-multierror v1.1.1
|
||||
github.com/onsi/ginkgo v1.16.5
|
||||
github.com/onsi/gomega v1.19.0
|
||||
github.com/onsi/gomega v1.24.1
|
||||
github.com/pensando/goipmi v0.0.0-20200303170213-e858ec1cf0b5
|
||||
github.com/pin/tftp v2.1.1-0.20200117065540-2f79be2dba4e+incompatible
|
||||
github.com/pkg/errors v0.9.1
|
||||
github.com/stretchr/testify v1.8.0
|
||||
github.com/talos-systems/go-blockdevice v0.3.4
|
||||
github.com/talos-systems/go-debug v0.2.1
|
||||
github.com/talos-systems/go-kmsg v0.1.1
|
||||
github.com/talos-systems/go-procfs v0.1.0
|
||||
github.com/talos-systems/go-retry v0.3.1
|
||||
github.com/talos-systems/go-smbios v0.1.2-0.20220202124743-3f1e775b7e3e
|
||||
github.com/talos-systems/grpc-proxy v0.3.1
|
||||
github.com/talos-systems/net v0.3.2
|
||||
github.com/talos-systems/siderolink v0.1.1-0.20211130121818-9902ad2774f0
|
||||
github.com/talos-systems/talos/pkg/machinery v1.2.0
|
||||
github.com/siderolabs/go-blockdevice v0.4.2
|
||||
github.com/siderolabs/go-debug v0.2.2
|
||||
github.com/siderolabs/go-kmsg v0.1.2
|
||||
github.com/siderolabs/go-procfs v0.1.1
|
||||
github.com/siderolabs/go-retry v0.3.2
|
||||
github.com/siderolabs/go-smbios v0.3.1
|
||||
github.com/siderolabs/grpc-proxy v0.4.0
|
||||
github.com/siderolabs/siderolink v0.3.1
|
||||
github.com/siderolabs/talos/pkg/machinery v1.3.0
|
||||
github.com/stretchr/testify v1.8.1
|
||||
go.uber.org/zap v1.23.0
|
||||
golang.org/x/net v0.0.0-20220809184613-07c6da5e1ced
|
||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4
|
||||
golang.org/x/sys v0.0.0-20220808155132-1c4a2a72c664
|
||||
golang.zx2c4.com/wireguard/wgctrl v0.0.0-20220330030906-9490840b0b01
|
||||
google.golang.org/grpc v1.49.0
|
||||
golang.org/x/net v0.2.0
|
||||
golang.org/x/sync v0.1.0
|
||||
golang.org/x/sys v0.2.0
|
||||
golang.zx2c4.com/wireguard/wgctrl v0.0.0-20220916014741-473347a5e6e3
|
||||
google.golang.org/grpc v1.51.0
|
||||
google.golang.org/protobuf v1.28.1
|
||||
inet.af/netaddr v0.0.0-20220811202034-502d2d690317
|
||||
k8s.io/api v0.24.2
|
||||
k8s.io/apiextensions-apiserver v0.24.2
|
||||
k8s.io/apimachinery v0.24.2
|
||||
k8s.io/client-go v0.24.2
|
||||
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9
|
||||
sigs.k8s.io/cluster-api v1.2.1
|
||||
sigs.k8s.io/controller-runtime v0.12.3
|
||||
k8s.io/api v0.25.0
|
||||
k8s.io/apiextensions-apiserver v0.25.0
|
||||
k8s.io/apimachinery v0.25.0
|
||||
k8s.io/client-go v0.25.0
|
||||
k8s.io/utils v0.0.0-20220823124924-e9cbc92d1a73
|
||||
sigs.k8s.io/cluster-api v1.3.1
|
||||
sigs.k8s.io/controller-runtime v0.13.1
|
||||
)
|
||||
|
||||
require (
|
||||
cloud.google.com/go v0.93.3 // indirect
|
||||
github.com/PuerkitoBio/purell v1.1.1 // indirect
|
||||
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
|
||||
cloud.google.com/go/compute v1.10.0 // indirect
|
||||
github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d // indirect
|
||||
github.com/beorn7/perks v1.0.1 // indirect
|
||||
github.com/blang/semver v3.5.1+incompatible // indirect
|
||||
github.com/cespare/xxhash/v2 v2.1.2 // indirect
|
||||
github.com/containerd/go-cni v1.1.7 // indirect
|
||||
github.com/containernetworking/cni v1.1.2 // indirect
|
||||
github.com/cosi-project/runtime v0.1.1 // indirect
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/digitalocean/go-smbios v0.0.0-20180907143718-390a4f403a8e // indirect
|
||||
github.com/dustin/go-humanize v1.0.0 // indirect
|
||||
github.com/emicklei/go-restful v2.15.0+incompatible // indirect
|
||||
github.com/fsnotify/fsnotify v1.5.4 // indirect
|
||||
github.com/gertd/go-pluralize v0.2.1 // indirect
|
||||
github.com/go-logr/zapr v1.2.0 // indirect
|
||||
github.com/emicklei/go-restful/v3 v3.9.0 // indirect
|
||||
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
|
||||
github.com/fsnotify/fsnotify v1.6.0 // indirect
|
||||
github.com/go-logr/zapr v1.2.3 // indirect
|
||||
github.com/go-openapi/jsonpointer v0.19.5 // indirect
|
||||
github.com/go-openapi/jsonreference v0.19.5 // indirect
|
||||
github.com/go-openapi/swag v0.19.14 // indirect
|
||||
github.com/gobuffalo/flect v0.2.5 // indirect
|
||||
github.com/go-openapi/jsonreference v0.20.0 // indirect
|
||||
github.com/go-openapi/swag v0.22.3 // indirect
|
||||
github.com/gobuffalo/flect v0.3.0 // indirect
|
||||
github.com/gogo/protobuf v1.3.2 // indirect
|
||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
|
||||
github.com/golang/protobuf v1.5.2 // indirect
|
||||
github.com/google/gnostic v0.5.7-v3refs // indirect
|
||||
github.com/google/gnostic v0.6.9 // indirect
|
||||
github.com/google/gofuzz v1.2.0 // indirect
|
||||
github.com/google/uuid v1.3.0 // indirect
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.2 // indirect
|
||||
github.com/hashicorp/errwrap v1.1.0 // indirect
|
||||
github.com/imdario/mergo v0.3.12 // indirect
|
||||
github.com/imdario/mergo v0.3.13 // indirect
|
||||
github.com/josharian/intern v1.0.0 // indirect
|
||||
github.com/josharian/native v1.0.0 // indirect
|
||||
github.com/jsimonetti/rtnetlink v1.2.2 // indirect
|
||||
github.com/jsimonetti/rtnetlink v1.3.0 // indirect
|
||||
github.com/json-iterator/go v1.1.12 // indirect
|
||||
github.com/mailru/easyjson v0.7.6 // indirect
|
||||
github.com/mailru/easyjson v0.7.7 // indirect
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
|
||||
github.com/mdlayher/ethtool v0.0.0-20220213132912-856bd6cb8a38 // indirect
|
||||
github.com/mdlayher/ethtool v0.0.0-20220830195143-0e16326d06d1 // indirect
|
||||
github.com/mdlayher/genetlink v1.2.0 // indirect
|
||||
github.com/mdlayher/netlink v1.6.0 // indirect
|
||||
github.com/mdlayher/socket v0.2.3 // indirect
|
||||
github.com/mdlayher/netlink v1.7.0 // indirect
|
||||
github.com/mdlayher/socket v0.4.0 // indirect
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
|
||||
github.com/nxadm/tail v1.4.8 // indirect
|
||||
github.com/opencontainers/runtime-spec v1.0.3-0.20200929063507-e6143ca7d51d // indirect
|
||||
github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417 // indirect
|
||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||
github.com/prometheus/client_golang v1.12.1 // indirect
|
||||
github.com/prometheus/client_golang v1.13.0 // indirect
|
||||
github.com/prometheus/client_model v0.2.0 // indirect
|
||||
github.com/prometheus/common v0.32.1 // indirect
|
||||
github.com/prometheus/procfs v0.7.3 // indirect
|
||||
github.com/prometheus/common v0.37.0 // indirect
|
||||
github.com/prometheus/procfs v0.8.0 // indirect
|
||||
github.com/rogpeppe/go-internal v1.9.0 // indirect
|
||||
github.com/ryanuber/go-glob v1.0.0 // indirect
|
||||
github.com/siderolabs/crypto v0.4.0 // indirect
|
||||
github.com/siderolabs/gen v0.4.1 // indirect
|
||||
github.com/siderolabs/go-pointer v1.0.0 // indirect
|
||||
github.com/siderolabs/protoenc v0.1.3 // indirect
|
||||
github.com/siderolabs/net v0.4.0 // indirect
|
||||
github.com/spf13/pflag v1.0.5 // indirect
|
||||
github.com/talos-systems/crypto v0.3.6 // indirect
|
||||
go.uber.org/atomic v1.9.0 // indirect
|
||||
go.uber.org/atomic v1.10.0 // indirect
|
||||
go.uber.org/multierr v1.8.0 // indirect
|
||||
go4.org/intern v0.0.0-20220617035311-6925f38cc365 // indirect
|
||||
go4.org/unsafe/assume-no-moving-gc v0.0.0-20220617031537-928513b29760 // indirect
|
||||
golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 // indirect
|
||||
golang.org/x/oauth2 v0.0.0-20220722155238-128564f6959c // indirect
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
|
||||
golang.org/x/text v0.3.7 // indirect
|
||||
golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect
|
||||
golang.zx2c4.com/go118/netip v0.0.0-20211111135330-a4a02eeacf9d // indirect
|
||||
go4.org/netipx v0.0.0-20220925034521-797b0c90d8ab // indirect
|
||||
golang.org/x/crypto v0.3.0 // indirect
|
||||
golang.org/x/oauth2 v0.1.0 // indirect
|
||||
golang.org/x/term v0.2.0 // indirect
|
||||
golang.org/x/text v0.5.0 // indirect
|
||||
golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9 // indirect
|
||||
golang.zx2c4.com/wintun v0.0.0-20211104114900-415007cec224 // indirect
|
||||
golang.zx2c4.com/wireguard v0.0.0-20220202223031-3b95c81cc178 // indirect
|
||||
golang.zx2c4.com/wireguard v0.0.0-20220920152132-bb719d3a6e2c // indirect
|
||||
gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
|
||||
google.golang.org/appengine v1.6.7 // indirect
|
||||
google.golang.org/genproto v0.0.0-20220812140447-cec7f5303424 // indirect
|
||||
google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6 // indirect
|
||||
gopkg.in/inf.v0 v0.9.1 // indirect
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
k8s.io/cluster-bootstrap v0.24.0 // indirect
|
||||
k8s.io/component-base v0.24.2 // indirect
|
||||
k8s.io/klog/v2 v2.60.1 // indirect
|
||||
k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42 // indirect
|
||||
sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 // indirect
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect
|
||||
k8s.io/cluster-bootstrap v0.25.0 // indirect
|
||||
k8s.io/component-base v0.25.0 // indirect
|
||||
k8s.io/klog/v2 v2.80.1 // indirect
|
||||
k8s.io/kube-openapi v0.0.0-20220803164354-a70c9af30aea // indirect
|
||||
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
|
||||
sigs.k8s.io/yaml v1.3.0 // indirect
|
||||
)
|
||||
|
@ -13,8 +13,8 @@ import (
|
||||
capi "sigs.k8s.io/cluster-api/api/v1beta1"
|
||||
"sigs.k8s.io/controller-runtime/pkg/client"
|
||||
|
||||
infrav1 "github.com/talos-systems/sidero/app/caps-controller-manager/api/v1alpha3"
|
||||
metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
infrav1 "github.com/siderolabs/sidero/app/caps-controller-manager/api/v1alpha3"
|
||||
metalv1 "github.com/siderolabs/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
)
|
||||
|
||||
// NewClient is responsible for creating a controller-runtime k8s client with all schemas.
|
||||
|
@ -7,11 +7,11 @@ package cmd
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/siderolabs/talos/pkg/cli"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/talos-systems/talos/pkg/cli"
|
||||
|
||||
"github.com/talos-systems/sidero/sfyra/pkg/bootstrap"
|
||||
"github.com/talos-systems/sidero/sfyra/pkg/capi"
|
||||
"github.com/siderolabs/sidero/sfyra/pkg/bootstrap"
|
||||
"github.com/siderolabs/sidero/sfyra/pkg/capi"
|
||||
)
|
||||
|
||||
var bootstrapCAPICmd = &cobra.Command{
|
||||
|
@ -7,10 +7,10 @@ package cmd
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/siderolabs/talos/pkg/cli"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/talos-systems/talos/pkg/cli"
|
||||
|
||||
"github.com/talos-systems/sidero/sfyra/pkg/bootstrap"
|
||||
"github.com/siderolabs/sidero/sfyra/pkg/bootstrap"
|
||||
)
|
||||
|
||||
var bootstrapClusterCmd = &cobra.Command{
|
||||
|
@ -6,12 +6,12 @@ package cmd
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net"
|
||||
"net/netip"
|
||||
|
||||
"github.com/siderolabs/talos/pkg/cli"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/talos-systems/talos/pkg/cli"
|
||||
|
||||
"github.com/talos-systems/sidero/sfyra/pkg/vm"
|
||||
"github.com/siderolabs/sidero/sfyra/pkg/vm"
|
||||
)
|
||||
|
||||
var bootSource string
|
||||
@ -22,7 +22,7 @@ var bootstrapServersCmd = &cobra.Command{
|
||||
Long: ``,
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
return cli.WithContext(context.Background(), func(ctx context.Context) error {
|
||||
bootSourceIP := net.ParseIP(bootSource)
|
||||
bootSourceIP := netip.MustParseAddr(bootSource)
|
||||
|
||||
vmSet, err := vm.NewSet(ctx, vm.Options{
|
||||
Name: options.ManagementSetName,
|
||||
|
@ -7,16 +7,16 @@ package cmd
|
||||
import (
|
||||
"context"
|
||||
"log"
|
||||
"net"
|
||||
"net/netip"
|
||||
|
||||
talosnet "github.com/siderolabs/net"
|
||||
"github.com/siderolabs/talos/pkg/cli"
|
||||
"github.com/spf13/cobra"
|
||||
talosnet "github.com/talos-systems/net"
|
||||
"github.com/talos-systems/talos/pkg/cli"
|
||||
"k8s.io/client-go/tools/clientcmd"
|
||||
clientcmdapi "k8s.io/client-go/tools/clientcmd/api"
|
||||
|
||||
"github.com/talos-systems/sidero/sfyra/pkg/capi"
|
||||
"github.com/talos-systems/sidero/sfyra/pkg/loadbalancer"
|
||||
"github.com/siderolabs/sidero/sfyra/pkg/capi"
|
||||
"github.com/siderolabs/sidero/sfyra/pkg/loadbalancer"
|
||||
)
|
||||
|
||||
var (
|
||||
@ -44,7 +44,7 @@ var loadbalancerCreateCmd = &cobra.Command{
|
||||
return err
|
||||
}
|
||||
|
||||
lb, err := loadbalancer.NewControlPlane(metalClient, net.ParseIP(lbAddress), lbPort, "default", clusterName, true)
|
||||
lb, err := loadbalancer.NewControlPlane(metalClient, netip.MustParseAddr(lbAddress), lbPort, "default", clusterName, true)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@ -61,10 +61,7 @@ var loadbalancerCreateCmd = &cobra.Command{
|
||||
func init() {
|
||||
loadbalancerCmd.AddCommand(loadbalancerCreateCmd)
|
||||
|
||||
_, cidr, err := net.ParseCIDR(options.ManagementCIDR)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
cidr := netip.MustParsePrefix(options.ManagementCIDR)
|
||||
|
||||
bridgeIP, err := talosnet.NthIPInNetwork(cidr, 1)
|
||||
if err != nil {
|
||||
|
@ -10,8 +10,8 @@ import (
|
||||
"log"
|
||||
"os"
|
||||
|
||||
debug "github.com/siderolabs/go-debug"
|
||||
"github.com/spf13/cobra"
|
||||
debug "github.com/talos-systems/go-debug"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -9,13 +9,13 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/siderolabs/talos/pkg/cli"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/talos-systems/talos/pkg/cli"
|
||||
|
||||
"github.com/talos-systems/sidero/sfyra/pkg/bootstrap"
|
||||
"github.com/talos-systems/sidero/sfyra/pkg/capi"
|
||||
"github.com/talos-systems/sidero/sfyra/pkg/tests"
|
||||
"github.com/talos-systems/sidero/sfyra/pkg/vm"
|
||||
"github.com/siderolabs/sidero/sfyra/pkg/bootstrap"
|
||||
"github.com/siderolabs/sidero/sfyra/pkg/capi"
|
||||
"github.com/siderolabs/sidero/sfyra/pkg/tests"
|
||||
"github.com/siderolabs/sidero/sfyra/pkg/vm"
|
||||
)
|
||||
|
||||
var runTestPattern string
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
package main
|
||||
|
||||
import "github.com/talos-systems/sidero/sfyra/cmd/sfyra/cmd"
|
||||
import "github.com/siderolabs/sidero/sfyra/cmd/sfyra/cmd"
|
||||
|
||||
func main() {
|
||||
cmd.Execute()
|
||||
|
198
sfyra/go.mod
198
sfyra/go.mod
@ -1,94 +1,104 @@
|
||||
module github.com/talos-systems/sidero/sfyra
|
||||
module github.com/siderolabs/sidero/sfyra
|
||||
|
||||
go 1.19
|
||||
|
||||
replace (
|
||||
// local replace
|
||||
github.com/talos-systems/sidero => ../
|
||||
github.com/siderolabs/sidero => ../
|
||||
|
||||
// See https://github.com/talos-systems/go-loadbalancer/pull/4
|
||||
// `go get github.com/smira/tcpproxy@combined-fixes`, then copy pseudo-version there
|
||||
inet.af/tcpproxy => github.com/smira/tcpproxy v0.0.0-20201015133617-de5f7797b95b
|
||||
|
||||
// k8s packages to match controller-runtime version
|
||||
k8s.io/api => k8s.io/api v0.25.0
|
||||
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.25.0
|
||||
k8s.io/apimachinery => k8s.io/apimachinery v0.25.0
|
||||
k8s.io/client-go => k8s.io/client-go v0.25.0
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/siderolabs/cluster-api-control-plane-provider-talos v0.4.11
|
||||
github.com/siderolabs/go-debug v0.2.2
|
||||
github.com/siderolabs/go-loadbalancer v0.2.1
|
||||
github.com/siderolabs/go-pointer v1.0.0
|
||||
github.com/spf13/cobra v1.5.0
|
||||
github.com/stretchr/testify v1.8.0
|
||||
github.com/talos-systems/cluster-api-control-plane-provider-talos v0.4.9
|
||||
github.com/talos-systems/go-debug v0.2.1
|
||||
github.com/talos-systems/go-loadbalancer v0.1.3
|
||||
github.com/talos-systems/go-procfs v0.1.0
|
||||
github.com/talos-systems/go-retry v0.3.1
|
||||
github.com/talos-systems/net v0.3.2
|
||||
github.com/talos-systems/sidero v0.0.0-00010101000000-000000000000
|
||||
github.com/talos-systems/talos v1.2.0
|
||||
github.com/talos-systems/talos/pkg/machinery v1.2.0
|
||||
google.golang.org/grpc v1.49.0
|
||||
github.com/siderolabs/go-procfs v0.1.1
|
||||
github.com/siderolabs/go-retry v0.3.2
|
||||
github.com/siderolabs/net v0.4.0
|
||||
github.com/siderolabs/sidero v0.0.0-00010101000000-000000000000
|
||||
github.com/siderolabs/talos v1.3.0
|
||||
github.com/siderolabs/talos/pkg/machinery v1.3.0
|
||||
github.com/spf13/cobra v1.6.1
|
||||
github.com/stretchr/testify v1.8.1
|
||||
google.golang.org/grpc v1.51.0
|
||||
gopkg.in/yaml.v3 v3.0.1
|
||||
k8s.io/api v0.25.0
|
||||
k8s.io/apiextensions-apiserver v0.24.2
|
||||
k8s.io/apimachinery v0.25.0
|
||||
k8s.io/client-go v0.25.0
|
||||
sigs.k8s.io/cluster-api v1.2.1
|
||||
sigs.k8s.io/controller-runtime v0.12.3
|
||||
k8s.io/api v0.26.0
|
||||
k8s.io/apiextensions-apiserver v0.25.0
|
||||
k8s.io/apimachinery v0.26.0
|
||||
k8s.io/client-go v0.26.0
|
||||
sigs.k8s.io/cluster-api v1.3.1
|
||||
sigs.k8s.io/controller-runtime v0.13.1
|
||||
)
|
||||
|
||||
require (
|
||||
cloud.google.com/go v0.102.1 // indirect
|
||||
cloud.google.com/go/compute v1.8.0 // indirect
|
||||
cloud.google.com/go/iam v0.3.0 // indirect
|
||||
cloud.google.com/go/storage v1.22.1 // indirect
|
||||
cloud.google.com/go v0.105.0 // indirect
|
||||
cloud.google.com/go/compute v1.12.1 // indirect
|
||||
cloud.google.com/go/compute/metadata v0.2.1 // indirect
|
||||
cloud.google.com/go/iam v0.7.0 // indirect
|
||||
cloud.google.com/go/storage v1.27.0 // indirect
|
||||
github.com/MakeNowJust/heredoc v1.0.0 // indirect
|
||||
github.com/Masterminds/goutils v1.1.1 // indirect
|
||||
github.com/Masterminds/semver/v3 v3.1.1 // indirect
|
||||
github.com/Masterminds/sprig/v3 v3.2.2 // indirect
|
||||
github.com/PuerkitoBio/purell v1.1.1 // indirect
|
||||
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
|
||||
github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20210826220005-b48c857c3a0e // indirect
|
||||
github.com/Masterminds/semver/v3 v3.2.0 // indirect
|
||||
github.com/Masterminds/sprig/v3 v3.2.3 // indirect
|
||||
github.com/ProtonMail/go-crypto v0.0.0-20220930113650-c6815a8c17ad // indirect
|
||||
github.com/ProtonMail/go-mime v0.0.0-20220302105931-303f85f7fe0f // indirect
|
||||
github.com/ProtonMail/gopenpgp/v2 v2.4.10 // indirect
|
||||
github.com/adrg/xdg v0.4.0 // indirect
|
||||
github.com/antlr/antlr4/runtime/Go/antlr v1.4.10 // indirect
|
||||
github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d // indirect
|
||||
github.com/aws/aws-sdk-go v1.44.76 // indirect
|
||||
github.com/aws/aws-sdk-go v1.44.147 // indirect
|
||||
github.com/beorn7/perks v1.0.1 // indirect
|
||||
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
|
||||
github.com/blang/semver v3.5.1+incompatible // indirect
|
||||
github.com/blang/semver/v4 v4.0.0 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.1.2 // indirect
|
||||
github.com/containerd/containerd v1.6.8 // indirect
|
||||
github.com/cloudflare/circl v1.1.0 // indirect
|
||||
github.com/containerd/containerd v1.6.12 // indirect
|
||||
github.com/containerd/go-cni v1.1.7 // indirect
|
||||
github.com/containernetworking/cni v1.1.2 // indirect
|
||||
github.com/containernetworking/plugins v1.1.1 // indirect
|
||||
github.com/coreos/go-iptables v0.6.0 // indirect
|
||||
github.com/cosi-project/runtime v0.1.1 // indirect
|
||||
github.com/cosi-project/runtime v0.2.0 // indirect
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/docker/distribution v2.8.1+incompatible // indirect
|
||||
github.com/drone/envsubst/v2 v2.0.0-20210730161058-179042472c46 // indirect
|
||||
github.com/dustin/go-humanize v1.0.0 // indirect
|
||||
github.com/emicklei/dot v1.0.0 // indirect
|
||||
github.com/emicklei/go-restful/v3 v3.8.0 // indirect
|
||||
github.com/emicklei/dot v1.2.0 // indirect
|
||||
github.com/emicklei/go-restful/v3 v3.9.0 // indirect
|
||||
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
|
||||
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
|
||||
github.com/fatih/color v1.13.0 // indirect
|
||||
github.com/fsnotify/fsnotify v1.5.4 // indirect
|
||||
github.com/fsnotify/fsnotify v1.6.0 // indirect
|
||||
github.com/gertd/go-pluralize v0.2.1 // indirect
|
||||
github.com/ghodss/yaml v1.0.0 // indirect
|
||||
github.com/go-logr/logr v1.2.3 // indirect
|
||||
github.com/go-openapi/jsonpointer v0.19.5 // indirect
|
||||
github.com/go-openapi/jsonreference v0.19.5 // indirect
|
||||
github.com/go-openapi/swag v0.19.14 // indirect
|
||||
github.com/gobuffalo/flect v0.2.5 // indirect
|
||||
github.com/go-openapi/jsonreference v0.20.0 // indirect
|
||||
github.com/go-openapi/swag v0.22.3 // indirect
|
||||
github.com/gobuffalo/flect v0.3.0 // indirect
|
||||
github.com/gogo/protobuf v1.3.2 // indirect
|
||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
|
||||
github.com/golang/protobuf v1.5.2 // indirect
|
||||
github.com/google/cel-go v0.10.1 // indirect
|
||||
github.com/google/gnostic v0.5.7-v3refs // indirect
|
||||
github.com/google/go-cmp v0.5.8 // indirect
|
||||
github.com/google/cel-go v0.12.5 // indirect
|
||||
github.com/google/gnostic v0.6.9 // indirect
|
||||
github.com/google/go-cmp v0.5.9 // indirect
|
||||
github.com/google/go-github/v45 v45.2.0 // indirect
|
||||
github.com/google/go-querystring v1.1.0 // indirect
|
||||
github.com/google/gofuzz v1.2.0 // indirect
|
||||
github.com/google/uuid v1.3.0 // indirect
|
||||
github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect
|
||||
github.com/googleapis/gax-go/v2 v2.4.0 // indirect
|
||||
github.com/googleapis/go-type-adapters v1.0.0 // indirect
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.2 // indirect
|
||||
github.com/googleapis/enterprise-certificate-proxy v0.2.0 // indirect
|
||||
github.com/googleapis/gax-go/v2 v2.6.0 // indirect
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.13.0 // indirect
|
||||
github.com/hashicorp/errwrap v1.1.0 // indirect
|
||||
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
|
||||
github.com/hashicorp/go-getter v1.6.2 // indirect
|
||||
@ -96,25 +106,25 @@ require (
|
||||
github.com/hashicorp/go-safetemp v1.0.0 // indirect
|
||||
github.com/hashicorp/go-version v1.6.0 // indirect
|
||||
github.com/hashicorp/hcl v1.0.0 // indirect
|
||||
github.com/huandu/xstrings v1.3.2 // indirect
|
||||
github.com/imdario/mergo v0.3.12 // indirect
|
||||
github.com/inconshreveable/mousetrap v1.0.0 // indirect
|
||||
github.com/insomniacslk/dhcp v0.0.0-20220812085412-509691fd59ec // indirect
|
||||
github.com/huandu/xstrings v1.3.3 // indirect
|
||||
github.com/imdario/mergo v0.3.13 // indirect
|
||||
github.com/inconshreveable/mousetrap v1.0.1 // indirect
|
||||
github.com/insomniacslk/dhcp v0.0.0-20221128164207-f26e6d78f622 // indirect
|
||||
github.com/jmespath/go-jmespath v0.4.0 // indirect
|
||||
github.com/josharian/intern v1.0.0 // indirect
|
||||
github.com/josharian/native v1.0.0 // indirect
|
||||
github.com/jsimonetti/rtnetlink v1.2.2 // indirect
|
||||
github.com/jsimonetti/rtnetlink v1.3.0 // indirect
|
||||
github.com/json-iterator/go v1.1.12 // indirect
|
||||
github.com/klauspost/compress v1.11.13 // indirect
|
||||
github.com/magiconair/properties v1.8.6 // indirect
|
||||
github.com/mailru/easyjson v0.7.6 // indirect
|
||||
github.com/mattn/go-colorable v0.1.12 // indirect
|
||||
github.com/mailru/easyjson v0.7.7 // indirect
|
||||
github.com/mattn/go-colorable v0.1.13 // indirect
|
||||
github.com/mattn/go-isatty v0.0.16 // indirect
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
|
||||
github.com/mdlayher/ethtool v0.0.0-20220213132912-856bd6cb8a38 // indirect
|
||||
github.com/mdlayher/genetlink v1.2.0 // indirect
|
||||
github.com/mdlayher/netlink v1.6.0 // indirect
|
||||
github.com/mdlayher/socket v0.2.3 // indirect
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
|
||||
github.com/mdlayher/ethtool v0.0.0-20220830195143-0e16326d06d1 // indirect
|
||||
github.com/mdlayher/genetlink v1.3.0 // indirect
|
||||
github.com/mdlayher/netlink v1.7.0 // indirect
|
||||
github.com/mdlayher/socket v0.4.0 // indirect
|
||||
github.com/mitchellh/copystructure v1.2.0 // indirect
|
||||
github.com/mitchellh/go-homedir v1.1.0 // indirect
|
||||
github.com/mitchellh/go-testing-interface v1.0.0 // indirect
|
||||
@ -123,64 +133,66 @@ require (
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
|
||||
github.com/onsi/gomega v1.19.0 // indirect
|
||||
github.com/onsi/gomega v1.24.1 // indirect
|
||||
github.com/opencontainers/go-digest v1.0.0 // indirect
|
||||
github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417 // indirect
|
||||
github.com/pelletier/go-toml v1.9.5 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.0.1 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.0.5 // indirect
|
||||
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect
|
||||
github.com/pkg/errors v0.9.1 // indirect
|
||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||
github.com/prometheus/client_golang v1.12.1 // indirect
|
||||
github.com/prometheus/client_model v0.2.0 // indirect
|
||||
github.com/prometheus/common v0.32.1 // indirect
|
||||
github.com/prometheus/client_golang v1.14.0 // indirect
|
||||
github.com/prometheus/client_model v0.3.0 // indirect
|
||||
github.com/prometheus/common v0.37.0 // indirect
|
||||
github.com/prometheus/procfs v0.8.0 // indirect
|
||||
github.com/ryanuber/go-glob v1.0.0 // indirect
|
||||
github.com/shopspring/decimal v1.2.0 // indirect
|
||||
github.com/siderolabs/protoenc v0.1.3 // indirect
|
||||
github.com/spf13/afero v1.8.2 // indirect
|
||||
github.com/shopspring/decimal v1.3.1 // indirect
|
||||
github.com/siderolabs/cluster-api-bootstrap-provider-talos v0.5.6 // indirect
|
||||
github.com/siderolabs/crypto v0.4.0 // indirect
|
||||
github.com/siderolabs/gen v0.4.1 // indirect
|
||||
github.com/siderolabs/go-api-signature v0.2.2 // indirect
|
||||
github.com/siderolabs/go-blockdevice v0.4.2 // indirect
|
||||
github.com/siderolabs/go-tail v0.1.0 // indirect
|
||||
github.com/siderolabs/protoenc v0.2.0 // indirect
|
||||
github.com/sirupsen/logrus v1.8.1 // indirect
|
||||
github.com/spf13/afero v1.9.2 // indirect
|
||||
github.com/spf13/cast v1.5.0 // indirect
|
||||
github.com/spf13/jwalterweatherman v1.1.0 // indirect
|
||||
github.com/spf13/pflag v1.0.5 // indirect
|
||||
github.com/spf13/viper v1.12.0 // indirect
|
||||
github.com/spf13/viper v1.13.0 // indirect
|
||||
github.com/stoewer/go-strcase v1.2.0 // indirect
|
||||
github.com/subosito/gotenv v1.3.0 // indirect
|
||||
github.com/talos-systems/cluster-api-bootstrap-provider-talos v0.5.5 // indirect
|
||||
github.com/talos-systems/crypto v0.3.6 // indirect
|
||||
github.com/talos-systems/go-blockdevice v0.3.4 // indirect
|
||||
github.com/subosito/gotenv v1.4.1 // indirect
|
||||
github.com/u-root/uio v0.0.0-20220204230159-dac05f7d2cb4 // indirect
|
||||
github.com/ulikunitz/xz v0.5.8 // indirect
|
||||
github.com/valyala/fastjson v1.6.3 // indirect
|
||||
go.opencensus.io v0.23.0 // indirect
|
||||
go.uber.org/atomic v1.9.0 // indirect
|
||||
go.uber.org/atomic v1.10.0 // indirect
|
||||
go.uber.org/multierr v1.8.0 // indirect
|
||||
go.uber.org/zap v1.23.0 // indirect
|
||||
go4.org/intern v0.0.0-20220617035311-6925f38cc365 // indirect
|
||||
go4.org/unsafe/assume-no-moving-gc v0.0.0-20220617031537-928513b29760 // indirect
|
||||
golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 // indirect
|
||||
golang.org/x/net v0.0.0-20220812174116-3211cb980234 // indirect
|
||||
golang.org/x/oauth2 v0.0.0-20220722155238-128564f6959c // indirect
|
||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 // indirect
|
||||
golang.org/x/sys v0.0.0-20220829200755-d48e67d00261 // indirect
|
||||
golang.org/x/term v0.0.0-20220722155259-a9ba230a4035 // indirect
|
||||
golang.org/x/text v0.3.7 // indirect
|
||||
golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9 // indirect
|
||||
golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f // indirect
|
||||
golang.org/x/crypto v0.3.0 // indirect
|
||||
golang.org/x/net v0.4.0 // indirect
|
||||
golang.org/x/oauth2 v0.2.0 // indirect
|
||||
golang.org/x/sync v0.1.0 // indirect
|
||||
golang.org/x/sys v0.3.0 // indirect
|
||||
golang.org/x/term v0.3.0 // indirect
|
||||
golang.org/x/text v0.5.0 // indirect
|
||||
golang.org/x/time v0.2.0 // indirect
|
||||
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
|
||||
gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
|
||||
google.golang.org/api v0.91.0 // indirect
|
||||
google.golang.org/api v0.102.0 // indirect
|
||||
google.golang.org/appengine v1.6.7 // indirect
|
||||
google.golang.org/genproto v0.0.0-20220812140447-cec7f5303424 // indirect
|
||||
google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6 // indirect
|
||||
google.golang.org/protobuf v1.28.1 // indirect
|
||||
gopkg.in/inf.v0 v0.9.1 // indirect
|
||||
gopkg.in/ini.v1 v1.66.4 // indirect
|
||||
gopkg.in/ini.v1 v1.67.0 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
inet.af/netaddr v0.0.0-20220811202034-502d2d690317 // indirect
|
||||
inet.af/tcpproxy v0.0.0-20200125044825-b6bb9b5b8252 // indirect
|
||||
k8s.io/apiserver v0.25.0 // indirect
|
||||
k8s.io/cluster-bootstrap v0.24.0 // indirect
|
||||
k8s.io/component-base v0.25.0 // indirect
|
||||
k8s.io/klog/v2 v2.70.1 // indirect
|
||||
k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1 // indirect
|
||||
k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed // indirect
|
||||
inet.af/tcpproxy v0.0.0-20221017015627-91f861402626 // indirect
|
||||
k8s.io/apiserver v0.26.0 // indirect
|
||||
k8s.io/cluster-bootstrap v0.25.0 // indirect
|
||||
k8s.io/component-base v0.26.0 // indirect
|
||||
k8s.io/klog/v2 v2.80.1 // indirect
|
||||
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 // indirect
|
||||
k8s.io/utils v0.0.0-20221107191617-1a15be271d1d // indirect
|
||||
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
|
||||
sigs.k8s.io/yaml v1.3.0 // indirect
|
||||
|
812
sfyra/go.sum
812
sfyra/go.sum
File diff suppressed because it is too large
Load Diff
@ -6,30 +6,26 @@ package bootstrap
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"net"
|
||||
"net/netip"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
talosnet "github.com/talos-systems/net"
|
||||
taloscluster "github.com/talos-systems/talos/pkg/cluster"
|
||||
"github.com/talos-systems/talos/pkg/cluster/check"
|
||||
clientconfig "github.com/talos-systems/talos/pkg/machinery/client/config"
|
||||
"github.com/talos-systems/talos/pkg/machinery/config/types/v1alpha1/bundle"
|
||||
"github.com/talos-systems/talos/pkg/machinery/config/types/v1alpha1/generate"
|
||||
"github.com/talos-systems/talos/pkg/machinery/config/types/v1alpha1/machine"
|
||||
"github.com/talos-systems/talos/pkg/provision"
|
||||
"github.com/talos-systems/talos/pkg/provision/access"
|
||||
"github.com/talos-systems/talos/pkg/provision/providers/qemu"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
"k8s.io/apimachinery/pkg/util/strategicpatch"
|
||||
talosnet "github.com/siderolabs/net"
|
||||
taloscluster "github.com/siderolabs/talos/pkg/cluster"
|
||||
"github.com/siderolabs/talos/pkg/cluster/check"
|
||||
clientconfig "github.com/siderolabs/talos/pkg/machinery/client/config"
|
||||
"github.com/siderolabs/talos/pkg/machinery/config/types/v1alpha1/bundle"
|
||||
"github.com/siderolabs/talos/pkg/machinery/config/types/v1alpha1/generate"
|
||||
"github.com/siderolabs/talos/pkg/machinery/config/types/v1alpha1/machine"
|
||||
"github.com/siderolabs/talos/pkg/provision"
|
||||
"github.com/siderolabs/talos/pkg/provision/access"
|
||||
"github.com/siderolabs/talos/pkg/provision/providers/qemu"
|
||||
|
||||
"github.com/talos-systems/sidero/sfyra/pkg/constants"
|
||||
"github.com/siderolabs/sidero/sfyra/pkg/constants"
|
||||
)
|
||||
|
||||
// Cluster sets up initial Talos cluster.
|
||||
@ -40,8 +36,9 @@ type Cluster struct {
|
||||
cluster provision.Cluster
|
||||
access *access.Adapter
|
||||
|
||||
bridgeIP net.IP
|
||||
masterIP net.IP
|
||||
bridgeIP netip.Addr
|
||||
controlplaneIP netip.Addr
|
||||
workerIP netip.Addr
|
||||
|
||||
stateDir string
|
||||
cniDir string
|
||||
@ -109,11 +106,7 @@ func (cluster *Cluster) Setup(ctx context.Context) error {
|
||||
checkCtx, checkCtxCancel := context.WithTimeout(ctx, 10*time.Minute)
|
||||
defer checkCtxCancel()
|
||||
|
||||
if err = check.Wait(checkCtx, cluster.access, check.DefaultClusterChecks(), check.StderrReporter()); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return cluster.untaint(ctx)
|
||||
return check.Wait(checkCtx, cluster.access, check.DefaultClusterChecks(), check.StderrReporter())
|
||||
}
|
||||
|
||||
func (cluster *Cluster) findExisting(ctx context.Context) error {
|
||||
@ -129,7 +122,7 @@ func (cluster *Cluster) findExisting(ctx context.Context) error {
|
||||
return err
|
||||
}
|
||||
|
||||
_, cidr, err := net.ParseCIDR(cluster.options.CIDR)
|
||||
cidr, err := netip.ParsePrefix(cluster.options.CIDR)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@ -139,7 +132,7 @@ func (cluster *Cluster) findExisting(ctx context.Context) error {
|
||||
return err
|
||||
}
|
||||
|
||||
cluster.masterIP, err = talosnet.NthIPInNetwork(cidr, 2)
|
||||
cluster.controlplaneIP, err = talosnet.NthIPInNetwork(cidr, 2)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@ -150,7 +143,7 @@ func (cluster *Cluster) findExisting(ctx context.Context) error {
|
||||
}
|
||||
|
||||
func (cluster *Cluster) create(ctx context.Context) error {
|
||||
_, cidr, err := net.ParseCIDR(cluster.options.CIDR)
|
||||
cidr, err := netip.ParsePrefix(cluster.options.CIDR)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@ -160,7 +153,12 @@ func (cluster *Cluster) create(ctx context.Context) error {
|
||||
return err
|
||||
}
|
||||
|
||||
cluster.masterIP, err = talosnet.NthIPInNetwork(cidr, 2)
|
||||
cluster.controlplaneIP, err = talosnet.NthIPInNetwork(cidr, 2)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
cluster.workerIP, err = talosnet.NthIPInNetwork(cidr, 3)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@ -170,8 +168,8 @@ func (cluster *Cluster) create(ctx context.Context) error {
|
||||
|
||||
Network: provision.NetworkRequest{
|
||||
Name: cluster.options.Name,
|
||||
CIDRs: []net.IPNet{*cidr},
|
||||
GatewayAddrs: []net.IP{cluster.bridgeIP},
|
||||
CIDRs: []netip.Prefix{cidr},
|
||||
GatewayAddrs: []netip.Addr{cluster.bridgeIP},
|
||||
MTU: constants.MTU,
|
||||
Nameservers: constants.Nameservers,
|
||||
CNI: provision.CNIConfig{
|
||||
@ -203,7 +201,7 @@ func (cluster *Cluster) create(ctx context.Context) error {
|
||||
genOptions = append(genOptions, generate.WithRegistryMirror(parts[0], parts[1]))
|
||||
}
|
||||
|
||||
masterEndpoint := cluster.masterIP.String()
|
||||
controlplaneEndpoint := cluster.controlplaneIP.String()
|
||||
|
||||
configBundle, err := bundle.NewConfigBundle(bundle.WithInputOptions(
|
||||
&bundle.InputOptions{
|
||||
@ -211,7 +209,7 @@ func (cluster *Cluster) create(ctx context.Context) error {
|
||||
Endpoint: fmt.Sprintf("https://%s", net.JoinHostPort(defaultInternalLB, "6443")),
|
||||
GenOptions: append(
|
||||
genOptions,
|
||||
generate.WithEndpointList([]string{masterEndpoint}),
|
||||
generate.WithEndpointList([]string{controlplaneEndpoint}),
|
||||
generate.WithInstallImage(cluster.options.InstallerImage),
|
||||
generate.WithDNSDomain("cluster.local"),
|
||||
),
|
||||
@ -222,9 +220,9 @@ func (cluster *Cluster) create(ctx context.Context) error {
|
||||
|
||||
request.Nodes = append(request.Nodes,
|
||||
provision.NodeRequest{
|
||||
Name: constants.BootstrapMaster,
|
||||
Name: constants.BootstrapControlPlane,
|
||||
Type: machine.TypeControlPlane,
|
||||
IPs: []net.IP{cluster.masterIP},
|
||||
IPs: []netip.Addr{cluster.controlplaneIP},
|
||||
Memory: cluster.options.MemMB * 1024 * 1024,
|
||||
NanoCPUs: cluster.options.CPUs * 1000 * 1000 * 1000,
|
||||
Disks: []*provision.Disk{
|
||||
@ -233,7 +231,21 @@ func (cluster *Cluster) create(ctx context.Context) error {
|
||||
},
|
||||
},
|
||||
Config: configBundle.ControlPlane(),
|
||||
})
|
||||
},
|
||||
provision.NodeRequest{
|
||||
Name: constants.BootstrapWorker,
|
||||
Type: machine.TypeWorker,
|
||||
IPs: []netip.Addr{cluster.workerIP},
|
||||
Memory: cluster.options.MemMB * 1024 * 1024,
|
||||
NanoCPUs: cluster.options.CPUs * 1000 * 1000 * 1000,
|
||||
Disks: []*provision.Disk{
|
||||
{
|
||||
Size: uint64(cluster.options.DiskGB) * 1024 * 1024 * 1024,
|
||||
},
|
||||
},
|
||||
Config: configBundle.Worker(),
|
||||
},
|
||||
)
|
||||
|
||||
cluster.cluster, err = cluster.provisioner.Create(ctx, request,
|
||||
provision.WithBootlader(true),
|
||||
@ -265,41 +277,6 @@ func (cluster *Cluster) create(ctx context.Context) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (cluster *Cluster) untaint(ctx context.Context) error {
|
||||
clientset, err := cluster.access.K8sClient(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
n, err := clientset.CoreV1().Nodes().Get(ctx, constants.BootstrapMaster, metav1.GetOptions{})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
oldData, err := json.Marshal(n)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to marshal unmodified node %q into JSON: %w", n.Name, err)
|
||||
}
|
||||
|
||||
n.Spec.Taints = []corev1.Taint{}
|
||||
|
||||
newData, err := json.Marshal(n)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to marshal modified node %q into JSON: %w", n.Name, err)
|
||||
}
|
||||
|
||||
patchBytes, err := strategicpatch.CreateTwoWayMergePatch(oldData, newData, corev1.Node{})
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to create two way merge patch: %w", err)
|
||||
}
|
||||
|
||||
if _, err := clientset.CoreV1().Nodes().Patch(ctx, n.Name, types.StrategicMergePatchType, patchBytes, metav1.PatchOptions{}); err != nil {
|
||||
return fmt.Errorf("error patching node %q: %w", n.Name, err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// TearDown the bootstrap cluster.
|
||||
func (cluster *Cluster) TearDown(ctx context.Context) error {
|
||||
if cluster.cluster != nil {
|
||||
@ -319,12 +296,12 @@ func (cluster *Cluster) KubernetesClient() taloscluster.K8sProvider {
|
||||
}
|
||||
|
||||
// SideroComponentsIP returns the IP of the master node.
|
||||
func (cluster *Cluster) SideroComponentsIP() net.IP {
|
||||
return cluster.masterIP
|
||||
func (cluster *Cluster) SideroComponentsIP() netip.Addr {
|
||||
return cluster.workerIP
|
||||
}
|
||||
|
||||
// BridgeIP returns the IP of the gateway (bridge).
|
||||
func (cluster *Cluster) BridgeIP() net.IP {
|
||||
func (cluster *Cluster) BridgeIP() netip.Addr {
|
||||
return cluster.bridgeIP
|
||||
}
|
||||
|
||||
|
@ -16,7 +16,7 @@ import (
|
||||
"sigs.k8s.io/cluster-api/cmd/clusterctl/client"
|
||||
runtimeclient "sigs.k8s.io/controller-runtime/pkg/client"
|
||||
|
||||
"github.com/talos-systems/sidero/sfyra/pkg/talos"
|
||||
"github.com/siderolabs/sidero/sfyra/pkg/talos"
|
||||
)
|
||||
|
||||
// Manager installs and controls cluster API installation.
|
||||
|
@ -8,8 +8,8 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
cacpt "github.com/talos-systems/cluster-api-control-plane-provider-talos/api/v1alpha3"
|
||||
"github.com/talos-systems/go-retry/retry"
|
||||
cacpt "github.com/siderolabs/cluster-api-control-plane-provider-talos/api/v1alpha3"
|
||||
"github.com/siderolabs/go-retry/retry"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
capiv1 "sigs.k8s.io/cluster-api/api/v1beta1"
|
||||
|
@ -9,15 +9,16 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
"net"
|
||||
"net/netip"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
cacpt "github.com/talos-systems/cluster-api-control-plane-provider-talos/api/v1alpha3"
|
||||
"github.com/talos-systems/go-retry/retry"
|
||||
taloscluster "github.com/talos-systems/talos/pkg/cluster"
|
||||
talosclusterapi "github.com/talos-systems/talos/pkg/machinery/api/cluster"
|
||||
talosclient "github.com/talos-systems/talos/pkg/machinery/client"
|
||||
clientconfig "github.com/talos-systems/talos/pkg/machinery/client/config"
|
||||
cacpt "github.com/siderolabs/cluster-api-control-plane-provider-talos/api/v1alpha3"
|
||||
"github.com/siderolabs/go-retry/retry"
|
||||
taloscluster "github.com/siderolabs/talos/pkg/cluster"
|
||||
talosclusterapi "github.com/siderolabs/talos/pkg/machinery/api/cluster"
|
||||
talosclient "github.com/siderolabs/talos/pkg/machinery/client"
|
||||
clientconfig "github.com/siderolabs/talos/pkg/machinery/client/config"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
@ -27,8 +28,8 @@ import (
|
||||
capiv1 "sigs.k8s.io/cluster-api/api/v1beta1"
|
||||
runtimeclient "sigs.k8s.io/controller-runtime/pkg/client"
|
||||
|
||||
infrav1 "github.com/talos-systems/sidero/app/caps-controller-manager/api/v1alpha3"
|
||||
metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
infrav1 "github.com/siderolabs/sidero/app/caps-controller-manager/api/v1alpha3"
|
||||
metalv1 "github.com/siderolabs/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
)
|
||||
|
||||
// Cluster attaches to the provisioned CAPI cluster and provides talos.Cluster.
|
||||
@ -36,13 +37,13 @@ type Cluster struct {
|
||||
name string
|
||||
controlPlaneNodes []string
|
||||
workerNodes []string
|
||||
bridgeIP net.IP
|
||||
bridgeIP netip.Addr
|
||||
client *talosclient.Client
|
||||
k8sProvider *taloscluster.KubernetesClient
|
||||
}
|
||||
|
||||
// NewCluster fetches cluster info from the CAPI state.
|
||||
func NewCluster(ctx context.Context, metalClient runtimeclient.Reader, clusterName string, bridgeIP net.IP) (*Cluster, error) {
|
||||
func NewCluster(ctx context.Context, metalClient runtimeclient.Reader, clusterName string, bridgeIP netip.Addr) (*Cluster, error) {
|
||||
var (
|
||||
cluster capiv1.Cluster
|
||||
controlPlane cacpt.TalosControlPlane
|
||||
@ -232,7 +233,7 @@ func (cluster *Cluster) Name() string {
|
||||
}
|
||||
|
||||
// BridgeIP returns IP of the bridge which controls the cluster.
|
||||
func (cluster *Cluster) BridgeIP() net.IP {
|
||||
func (cluster *Cluster) BridgeIP() netip.Addr {
|
||||
return cluster.bridgeIP
|
||||
}
|
||||
|
||||
|
@ -5,15 +5,15 @@
|
||||
package capi
|
||||
|
||||
import (
|
||||
cacpt "github.com/talos-systems/cluster-api-control-plane-provider-talos/api/v1alpha3"
|
||||
cacpt "github.com/siderolabs/cluster-api-control-plane-provider-talos/api/v1alpha3"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
clientgoscheme "k8s.io/client-go/kubernetes/scheme"
|
||||
"k8s.io/client-go/rest"
|
||||
capiv1 "sigs.k8s.io/cluster-api/api/v1beta1"
|
||||
runtimeclient "sigs.k8s.io/controller-runtime/pkg/client"
|
||||
|
||||
infrav1 "github.com/talos-systems/sidero/app/caps-controller-manager/api/v1alpha3"
|
||||
metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
infrav1 "github.com/siderolabs/sidero/app/caps-controller-manager/api/v1alpha3"
|
||||
metalv1 "github.com/siderolabs/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
)
|
||||
|
||||
// GetMetalClient builds k8s client with schemes required to access all the CAPI/Sidero/Talos components.
|
||||
|
@ -5,16 +5,19 @@
|
||||
// Package constants provides default values for some parameters.
|
||||
package constants
|
||||
|
||||
import "net"
|
||||
import "net/netip"
|
||||
|
||||
// Nameservers are defaults to use in bootstrap cluster.
|
||||
var Nameservers = []net.IP{net.ParseIP("8.8.8.8"), net.ParseIP("1.1.1.1")}
|
||||
var Nameservers = []netip.Addr{netip.MustParseAddr("8.8.8.8"), netip.MustParseAddr("1.1.1.1")}
|
||||
|
||||
// MTU default setting.
|
||||
const MTU = 1440
|
||||
|
||||
// BootstrapMaster is a bootstrap cluster master node name.
|
||||
const BootstrapMaster = "bootstrap-master"
|
||||
// BootstrapControlPlane is a bootstrap cluster control-plane node name.
|
||||
const BootstrapControlPlane = "bootstrap-control-plane"
|
||||
|
||||
// BootstrapWorker is a bootstrap cluster worker node name.
|
||||
const BootstrapWorker = "bootstrap-worker"
|
||||
|
||||
// SideroAPIVersion is a string we need for creating Sidero resources.
|
||||
const SideroAPIVersion = "metal.sidero.dev/v1alpha2"
|
||||
|
@ -10,22 +10,22 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
"log"
|
||||
"net"
|
||||
"net/netip"
|
||||
"reflect"
|
||||
"sort"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
cacpt "github.com/talos-systems/cluster-api-control-plane-provider-talos/api/v1alpha3"
|
||||
"github.com/talos-systems/go-loadbalancer/controlplane"
|
||||
cacpt "github.com/siderolabs/cluster-api-control-plane-provider-talos/api/v1alpha3"
|
||||
"github.com/siderolabs/go-loadbalancer/controlplane"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
capiv1 "sigs.k8s.io/cluster-api/api/v1beta1"
|
||||
"sigs.k8s.io/controller-runtime/pkg/client"
|
||||
|
||||
infrav1 "github.com/talos-systems/sidero/app/caps-controller-manager/api/v1alpha3"
|
||||
metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
infrav1 "github.com/siderolabs/sidero/app/caps-controller-manager/api/v1alpha3"
|
||||
metalv1 "github.com/siderolabs/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
)
|
||||
|
||||
// ControlPlane implements dynamic loadbalancer for the control plane.
|
||||
@ -44,7 +44,7 @@ type ControlPlane struct {
|
||||
}
|
||||
|
||||
// NewControlPlane initializes new control plane load balancer.
|
||||
func NewControlPlane(client client.Client, address net.IP, port int, clusterNamespace, clusterName string, verboseLog bool) (*ControlPlane, error) {
|
||||
func NewControlPlane(client client.Client, address netip.Addr, port int, clusterNamespace, clusterName string, verboseLog bool) (*ControlPlane, error) {
|
||||
cp := ControlPlane{
|
||||
client: client,
|
||||
clusterNamespace: clusterNamespace,
|
||||
|
@ -6,9 +6,9 @@
|
||||
package talos
|
||||
|
||||
import (
|
||||
"net"
|
||||
"net/netip"
|
||||
|
||||
"github.com/talos-systems/talos/pkg/cluster"
|
||||
"github.com/siderolabs/talos/pkg/cluster"
|
||||
)
|
||||
|
||||
// Cluster is an abstract interface for the Talos cluster.
|
||||
@ -18,9 +18,9 @@ type Cluster interface {
|
||||
// Name of the cluster.
|
||||
Name() string
|
||||
// IP of the bridge which controls the cluster.
|
||||
BridgeIP() net.IP
|
||||
BridgeIP() netip.Addr
|
||||
// IP for the Sidero components (TFTP, iPXE, etc.).
|
||||
SideroComponentsIP() net.IP
|
||||
SideroComponentsIP() netip.Addr
|
||||
// K8s client source.
|
||||
KubernetesClient() cluster.K8sProvider
|
||||
}
|
||||
|
@ -11,8 +11,8 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/siderolabs/go-retry/retry"
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/talos-systems/go-retry/retry"
|
||||
apierrors "k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/api/meta"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
@ -25,10 +25,10 @@ import (
|
||||
capiclient "sigs.k8s.io/cluster-api/cmd/clusterctl/client"
|
||||
"sigs.k8s.io/controller-runtime/pkg/client"
|
||||
|
||||
"github.com/talos-systems/sidero/sfyra/pkg/capi"
|
||||
"github.com/talos-systems/sidero/sfyra/pkg/loadbalancer"
|
||||
"github.com/talos-systems/sidero/sfyra/pkg/talos"
|
||||
"github.com/talos-systems/sidero/sfyra/pkg/vm"
|
||||
"github.com/siderolabs/sidero/sfyra/pkg/capi"
|
||||
"github.com/siderolabs/sidero/sfyra/pkg/loadbalancer"
|
||||
"github.com/siderolabs/sidero/sfyra/pkg/talos"
|
||||
"github.com/siderolabs/sidero/sfyra/pkg/vm"
|
||||
)
|
||||
|
||||
type clusterOptions struct {
|
||||
|
@ -18,16 +18,16 @@ import (
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
"sigs.k8s.io/controller-runtime/pkg/client"
|
||||
|
||||
"github.com/siderolabs/go-procfs/procfs"
|
||||
"github.com/siderolabs/go-retry/retry"
|
||||
"github.com/siderolabs/talos/pkg/machinery/kernel"
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/talos-systems/go-procfs/procfs"
|
||||
"github.com/talos-systems/go-retry/retry"
|
||||
"github.com/talos-systems/talos/pkg/machinery/kernel"
|
||||
|
||||
metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
"github.com/talos-systems/sidero/sfyra/pkg/capi"
|
||||
"github.com/talos-systems/sidero/sfyra/pkg/constants"
|
||||
"github.com/talos-systems/sidero/sfyra/pkg/talos"
|
||||
"github.com/talos-systems/sidero/sfyra/pkg/vm"
|
||||
metalv1 "github.com/siderolabs/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
"github.com/siderolabs/sidero/sfyra/pkg/capi"
|
||||
"github.com/siderolabs/sidero/sfyra/pkg/constants"
|
||||
"github.com/siderolabs/sidero/sfyra/pkg/talos"
|
||||
"github.com/siderolabs/sidero/sfyra/pkg/vm"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -9,18 +9,18 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/siderolabs/go-procfs/procfs"
|
||||
"github.com/siderolabs/go-retry/retry"
|
||||
"github.com/siderolabs/talos/pkg/machinery/kernel"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/talos-systems/go-procfs/procfs"
|
||||
"github.com/talos-systems/go-retry/retry"
|
||||
"github.com/talos-systems/talos/pkg/machinery/kernel"
|
||||
apierrors "k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
"sigs.k8s.io/controller-runtime/pkg/client"
|
||||
|
||||
metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
"github.com/talos-systems/sidero/sfyra/pkg/constants"
|
||||
"github.com/talos-systems/sidero/sfyra/pkg/talos"
|
||||
metalv1 "github.com/siderolabs/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
"github.com/siderolabs/sidero/sfyra/pkg/constants"
|
||||
"github.com/siderolabs/sidero/sfyra/pkg/talos"
|
||||
)
|
||||
|
||||
const environmentName = "sfyra"
|
||||
|
@ -10,9 +10,9 @@ import (
|
||||
|
||||
"sigs.k8s.io/controller-runtime/pkg/client"
|
||||
|
||||
"github.com/talos-systems/sidero/sfyra/pkg/capi"
|
||||
"github.com/talos-systems/sidero/sfyra/pkg/talos"
|
||||
"github.com/talos-systems/sidero/sfyra/pkg/vm"
|
||||
"github.com/siderolabs/sidero/sfyra/pkg/capi"
|
||||
"github.com/siderolabs/sidero/sfyra/pkg/talos"
|
||||
"github.com/siderolabs/sidero/sfyra/pkg/vm"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -13,7 +13,7 @@ import (
|
||||
capiv1 "sigs.k8s.io/cluster-api/api/v1beta1"
|
||||
"sigs.k8s.io/controller-runtime/pkg/client"
|
||||
|
||||
metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
metalv1 "github.com/siderolabs/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
)
|
||||
|
||||
// TestMatchServersMetalMachines verifies that number of metal machines and servers match.
|
||||
|
@ -10,16 +10,16 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/siderolabs/go-retry/retry"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/talos-systems/go-retry/retry"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
capiv1 "sigs.k8s.io/cluster-api/api/v1beta1"
|
||||
"sigs.k8s.io/cluster-api/util/patch"
|
||||
"sigs.k8s.io/controller-runtime/pkg/client"
|
||||
|
||||
infrav1 "github.com/talos-systems/sidero/app/caps-controller-manager/api/v1alpha3"
|
||||
infrav1 "github.com/siderolabs/sidero/app/caps-controller-manager/api/v1alpha3"
|
||||
)
|
||||
|
||||
// TestMachineDeploymentReconcile verifies that machine deployment can reconcile delete machines.
|
||||
|
@ -10,13 +10,13 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/siderolabs/go-retry/retry"
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/talos-systems/go-retry/retry"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"sigs.k8s.io/controller-runtime/pkg/client"
|
||||
|
||||
infrav1 "github.com/talos-systems/sidero/app/caps-controller-manager/api/v1alpha3"
|
||||
metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
infrav1 "github.com/siderolabs/sidero/app/caps-controller-manager/api/v1alpha3"
|
||||
metalv1 "github.com/siderolabs/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
)
|
||||
|
||||
// TestServerReset verifies that all the servers got reset.
|
||||
|
@ -10,16 +10,16 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
capbt "github.com/siderolabs/cluster-api-control-plane-provider-talos/api/v1alpha3"
|
||||
"github.com/siderolabs/go-retry/retry"
|
||||
"github.com/stretchr/testify/require"
|
||||
capbt "github.com/talos-systems/cluster-api-control-plane-provider-talos/api/v1alpha3"
|
||||
"github.com/talos-systems/go-retry/retry"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
capiv1 "sigs.k8s.io/cluster-api/api/v1beta1"
|
||||
"sigs.k8s.io/controller-runtime/pkg/client"
|
||||
|
||||
"github.com/talos-systems/sidero/sfyra/pkg/capi"
|
||||
"github.com/talos-systems/sidero/sfyra/pkg/vm"
|
||||
"github.com/siderolabs/sidero/sfyra/pkg/capi"
|
||||
"github.com/siderolabs/sidero/sfyra/pkg/vm"
|
||||
)
|
||||
|
||||
type ScaleCallBack func(runtime.Object) error
|
||||
|
@ -16,10 +16,10 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/siderolabs/go-pointer"
|
||||
"github.com/siderolabs/go-retry/retry"
|
||||
talosconfig "github.com/siderolabs/talos/pkg/machinery/config/types/v1alpha1"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/talos-systems/go-retry/retry"
|
||||
talosconfig "github.com/talos-systems/talos/pkg/machinery/config/types/v1alpha1"
|
||||
"gopkg.in/yaml.v3"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
v1 "k8s.io/api/core/v1"
|
||||
@ -30,13 +30,13 @@ import (
|
||||
"sigs.k8s.io/cluster-api/util/patch"
|
||||
"sigs.k8s.io/controller-runtime/pkg/client"
|
||||
|
||||
infrav1 "github.com/talos-systems/sidero/app/caps-controller-manager/api/v1alpha3"
|
||||
metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
siderotypes "github.com/talos-systems/sidero/app/sidero-controller-manager/pkg/types"
|
||||
"github.com/talos-systems/sidero/sfyra/pkg/capi"
|
||||
"github.com/talos-systems/sidero/sfyra/pkg/constants"
|
||||
"github.com/talos-systems/sidero/sfyra/pkg/talos"
|
||||
"github.com/talos-systems/sidero/sfyra/pkg/vm"
|
||||
infrav1 "github.com/siderolabs/sidero/app/caps-controller-manager/api/v1alpha3"
|
||||
metalv1 "github.com/siderolabs/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
siderotypes "github.com/siderolabs/sidero/app/sidero-controller-manager/pkg/types"
|
||||
"github.com/siderolabs/sidero/sfyra/pkg/capi"
|
||||
"github.com/siderolabs/sidero/sfyra/pkg/constants"
|
||||
"github.com/siderolabs/sidero/sfyra/pkg/talos"
|
||||
"github.com/siderolabs/sidero/sfyra/pkg/vm"
|
||||
)
|
||||
|
||||
// TestServerRegistration verifies that all the servers got registered.
|
||||
|
@ -14,11 +14,11 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/siderolabs/go-retry/retry"
|
||||
"github.com/siderolabs/talos/pkg/machinery/config/configloader"
|
||||
talosconfig "github.com/siderolabs/talos/pkg/machinery/config/types/v1alpha1"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/talos-systems/go-retry/retry"
|
||||
"github.com/talos-systems/talos/pkg/machinery/config/configloader"
|
||||
talosconfig "github.com/talos-systems/talos/pkg/machinery/config/types/v1alpha1"
|
||||
v1 "k8s.io/api/core/v1"
|
||||
apiextensions "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
|
||||
apierrors "k8s.io/apimachinery/pkg/api/errors"
|
||||
@ -32,11 +32,11 @@ import (
|
||||
capiclient "sigs.k8s.io/cluster-api/cmd/clusterctl/client"
|
||||
"sigs.k8s.io/controller-runtime/pkg/client"
|
||||
|
||||
metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
"github.com/talos-systems/sidero/sfyra/pkg/capi"
|
||||
"github.com/talos-systems/sidero/sfyra/pkg/constants"
|
||||
"github.com/talos-systems/sidero/sfyra/pkg/talos"
|
||||
"github.com/talos-systems/sidero/sfyra/pkg/vm"
|
||||
metalv1 "github.com/siderolabs/sidero/app/sidero-controller-manager/api/v1alpha2"
|
||||
"github.com/siderolabs/sidero/sfyra/pkg/capi"
|
||||
"github.com/siderolabs/sidero/sfyra/pkg/constants"
|
||||
"github.com/siderolabs/sidero/sfyra/pkg/talos"
|
||||
"github.com/siderolabs/sidero/sfyra/pkg/vm"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -11,9 +11,9 @@ import (
|
||||
"regexp"
|
||||
"testing"
|
||||
|
||||
"github.com/talos-systems/sidero/sfyra/pkg/capi"
|
||||
"github.com/talos-systems/sidero/sfyra/pkg/talos"
|
||||
"github.com/talos-systems/sidero/sfyra/pkg/vm"
|
||||
"github.com/siderolabs/sidero/sfyra/pkg/capi"
|
||||
"github.com/siderolabs/sidero/sfyra/pkg/talos"
|
||||
"github.com/siderolabs/sidero/sfyra/pkg/vm"
|
||||
)
|
||||
|
||||
// TestFunc is a testing function prototype.
|
||||
|
@ -10,9 +10,9 @@ import (
|
||||
|
||||
"sigs.k8s.io/controller-runtime/pkg/client"
|
||||
|
||||
"github.com/talos-systems/sidero/sfyra/pkg/capi"
|
||||
"github.com/talos-systems/sidero/sfyra/pkg/talos"
|
||||
"github.com/talos-systems/sidero/sfyra/pkg/vm"
|
||||
"github.com/siderolabs/sidero/sfyra/pkg/capi"
|
||||
"github.com/siderolabs/sidero/sfyra/pkg/talos"
|
||||
"github.com/siderolabs/sidero/sfyra/pkg/vm"
|
||||
)
|
||||
|
||||
const (
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user