diff --git a/Makefile b/Makefile index 61f363075..63436bed9 100644 --- a/Makefile +++ b/Makefile @@ -23,6 +23,7 @@ GOBIN=$(shell go env GOPATH)/bin else GOBIN=$(shell go env GOBIN) endif +BUILDARGS ?= # Setting SHELL to bash allows bash commands to be executed by recipes. # This is a requirement for 'setup-envtest.sh' in the test target. @@ -186,47 +187,47 @@ docker-build: \ .PHONY: docker-build-ironcore-apiserver docker-build-ironcore-apiserver: ## Build ironcore-apiserver. - docker build --target apiserver -t ${APISERVER_IMG} . + docker build $(BUILDARGS) --target apiserver -t ${APISERVER_IMG} . --load .PHONY: docker-build-ironcore-controller-manager docker-build-ironcore-controller-manager: ## Build ironcore-controller-manager. - docker build --target manager -t ${CONTROLLER_IMG} . + docker build $(BUILDARGS) --target manager -t ${CONTROLLER_IMG} . --load .PHONY: docker-build-machinepoollet docker-build-machinepoollet: ## Build machinepoollet image. - docker build --target machinepoollet -t ${MACHINEPOOLLET_IMG} . + docker build $(BUILDARGS) --target machinepoollet -t ${MACHINEPOOLLET_IMG} . --load .PHONY: docker-build-machinebroker docker-build-machinebroker: ## Build machinebroker image. - docker build --target machinebroker -t ${MACHINEBROKER_IMG} . + docker build $(BUILDARGS) --target machinebroker -t ${MACHINEBROKER_IMG} . --load .PHONY: docker-build-irictl-machine docker-build-irictl-machine: ## Build irictl-machine image. - docker build --target irictl-machine -t ${IRICTL_MACHINE_IMG} . + docker build $(BUILDARGS) --target irictl-machine -t ${IRICTL_MACHINE_IMG} . --load .PHONY: docker-build-volumepoollet docker-build-volumepoollet: ## Build volumepoollet image. - docker build --target volumepoollet -t ${VOLUMEPOOLLET_IMG} . + docker build $(BUILDARGS) --target volumepoollet -t ${VOLUMEPOOLLET_IMG} . --load .PHONY: docker-build-volumebroker docker-build-volumebroker: ## Build volumebroker image. - docker build --target volumebroker -t ${VOLUMEBROKER_IMG} . + docker build $(BUILDARGS) --target volumebroker -t ${VOLUMEBROKER_IMG} . --load .PHONY: docker-build-irictl-volume docker-build-irictl-volume: ## Build irictl-volume image. - docker build --target irictl-volume -t ${IRICTL_VOLUME_IMG} . + docker build $(BUILDARGS) --target irictl-volume -t ${IRICTL_VOLUME_IMG} . --load .PHONY: docker-build-bucketpoollet docker-build-bucketpoollet: ## Build bucketpoollet image. - docker build --target bucketpoollet -t ${BUCKETPOOLLET_IMG} . + docker build $(BUILDARGS) --target bucketpoollet -t ${BUCKETPOOLLET_IMG} . --load .PHONY: docker-build-bucketbroker docker-build-bucketbroker: ## Build bucketbroker image. - docker build --target bucketbroker -t ${BUCKETBROKER_IMG} . + docker build $(BUILDARGS) --target bucketbroker -t ${BUCKETBROKER_IMG} . --load .PHONY: docker-build-irictl-bucket docker-build-irictl-bucket: ## Build irictl-bucket image. - docker build --target irictl-bucket -t ${IRICTL_BUCKET_IMG} . + docker build $(BUILDARGS) --target irictl-bucket -t ${IRICTL_BUCKET_IMG} . --load .PHONY: docker-push docker-push: ## Push docker image with the manager. @@ -257,11 +258,11 @@ undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/confi .PHONY: kind-build-apiserver kind-build-apiserver: ## Build the apiserver for usage in kind. - docker build --target apiserver -t apiserver . + docker build $(BUILDARGS) --target apiserver -t apiserver . .PHONY: kind-build-controller kind-build-controller: ## Build the controller for usage in kind. - docker build --target manager -t controller . + docker build $(BUILDARGS) --target manager -t controller . .PHONY: kind-build kind-build: kind-build-apiserver kind-build-controller ## Build the apiserver and controller for usage in kind. diff --git a/api/networking/v1alpha1/network_type.go b/api/networking/v1alpha1/network_type.go index f47e1f4a7..67d5302e9 100644 --- a/api/networking/v1alpha1/network_type.go +++ b/api/networking/v1alpha1/network_type.go @@ -12,6 +12,10 @@ import ( type NetworkSpec struct { // ProviderID is the provider-internal ID of the network. ProviderID string `json:"providerID,omitempty"` + + // InternetGateway is a flag that indicates whether the network has an internet gateway. + InternetGateway bool `json:"internetGateway,omitempty"` + // Peerings are the network peerings with this network. // +optional // +patchMergeKey=name diff --git a/broker/machinebroker/server/machine_list.go b/broker/machinebroker/server/machine_list.go index 7f4b7ac1b..7f1f1b560 100644 --- a/broker/machinebroker/server/machine_list.go +++ b/broker/machinebroker/server/machine_list.go @@ -66,6 +66,8 @@ func (s *Server) aggregateIronCoreMachine( rd client.Reader, ironcoreMachine *computev1alpha1.Machine, ) (*AggregateIronCoreMachine, error) { + log := s.loggerFrom(ctx) + var ignitionSecret *corev1.Secret if ignitionRef := ironcoreMachine.Spec.IgnitionRef; ignitionRef != nil { secret := &corev1.Secret{} @@ -89,10 +91,12 @@ func (s *Server) aggregateIronCoreMachine( aggIronCoreNic, err := s.aggregateIronCoreNetworkInterface(ctx, rd, ironcoreNic) if err != nil { - return nil, fmt.Errorf("error aggregating network interface: %w", err) + log.Error(err, fmt.Sprintf("error aggregating network interface %s", ironcoreNic.Name)) } - aggIronCoreNics[machineNic.Name] = aggIronCoreNic + if aggIronCoreNic != nil { + aggIronCoreNics[machineNic.Name] = aggIronCoreNic + } } } diff --git a/client-go/applyconfigurations/internal/internal.go b/client-go/applyconfigurations/internal/internal.go index edc14f8e5..b4d5a5d1a 100644 --- a/client-go/applyconfigurations/internal/internal.go +++ b/client-go/applyconfigurations/internal/internal.go @@ -1143,6 +1143,9 @@ var schemaYAML = typed.YAMLObject(`types: elementRelationship: associative keys: - name + - name: internetGateway + type: + scalar: boolean - name: peerings type: list: diff --git a/client-go/applyconfigurations/networking/v1alpha1/networkspec.go b/client-go/applyconfigurations/networking/v1alpha1/networkspec.go index 786c7c696..0ff4cdde4 100644 --- a/client-go/applyconfigurations/networking/v1alpha1/networkspec.go +++ b/client-go/applyconfigurations/networking/v1alpha1/networkspec.go @@ -9,6 +9,7 @@ package v1alpha1 // with apply. type NetworkSpecApplyConfiguration struct { ProviderID *string `json:"providerID,omitempty"` + InternetGateway *bool `json:"internetGateway,omitempty"` Peerings []NetworkPeeringApplyConfiguration `json:"peerings,omitempty"` PeeringClaimRefs []NetworkPeeringClaimRefApplyConfiguration `json:"incomingPeerings,omitempty"` } @@ -27,6 +28,14 @@ func (b *NetworkSpecApplyConfiguration) WithProviderID(value string) *NetworkSpe return b } +// WithInternetGateway sets the InternetGateway field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the InternetGateway field is set to the value of the last call. +func (b *NetworkSpecApplyConfiguration) WithInternetGateway(value bool) *NetworkSpecApplyConfiguration { + b.InternetGateway = &value + return b +} + // WithPeerings adds the given value to the Peerings field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Peerings field. diff --git a/client-go/openapi/zz_generated.openapi.go b/client-go/openapi/zz_generated.openapi.go index e8fb61558..4b41e4df7 100644 --- a/client-go/openapi/zz_generated.openapi.go +++ b/client-go/openapi/zz_generated.openapi.go @@ -4143,6 +4143,13 @@ func schema_ironcore_api_networking_v1alpha1_NetworkSpec(ref common.ReferenceCal Format: "", }, }, + "internetGateway": { + SchemaProps: spec.SchemaProps{ + Description: "InternetGateway is a flag that indicates whether the network has an internet gateway.", + Type: []string{"boolean"}, + Format: "", + }, + }, "peerings": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ diff --git a/docs/api-reference/compute.md b/docs/api-reference/compute.md index 0f10c00d6..f2f9f80d1 100644 --- a/docs/api-reference/compute.md +++ b/docs/api-reference/compute.md @@ -1178,6 +1178,9 @@ MachinePool.

"Terminated"

MachineStateTerminated means the machine has been permanently stopped and cannot be started.

+

"Terminating"

+

MachineStateTerminating means the machine that is terminating.

+

MachineStatus diff --git a/docs/api-reference/networking.md b/docs/api-reference/networking.md index 834df1a3a..eaad3a59f 100644 --- a/docs/api-reference/networking.md +++ b/docs/api-reference/networking.md @@ -444,6 +444,17 @@ string +internetGateway
+ +bool + + + +

InternetGateway is a flag that indicates whether the network has an internet gateway.

+ + + + peerings
@@ -2003,6 +2014,29 @@ string +

NetworkPeeringState +(string alias)

+

+(Appears on:NetworkPeeringStatus) +

+
+

NetworkPeeringState is the state a NetworkPeering can be in

+
+ + + + + + + + + + + + +
ValueDescription

"Applied"

NetworkPeeringStateApplied signals that the network peering is applied.

+

"Pending"

NetworkPeeringStatePending signals that the network peering is not applied.

+

NetworkPeeringStatus

@@ -2030,6 +2064,19 @@ string

Name is the name of the network peering.

+ + +state
+ + +NetworkPeeringState + + + + +

State represents the network peering state

+ +

NetworkPolicyCondition @@ -2472,6 +2519,17 @@ string +internetGateway
+ +bool + + + +

InternetGateway is a flag that indicates whether the network has an internet gateway.

+ + + + peerings
diff --git a/internal/apis/networking/network_type.go b/internal/apis/networking/network_type.go index e2d26b131..bff3c9d20 100644 --- a/internal/apis/networking/network_type.go +++ b/internal/apis/networking/network_type.go @@ -12,6 +12,10 @@ import ( type NetworkSpec struct { // ProviderID is the provider-internal ID of the network. ProviderID string + + // InternetGateway is a flag that indicates whether the network has an internet gateway. + InternetGateway bool + // Peerings are the network peerings with this network. // +optional // +patchMergeKey=name diff --git a/internal/apis/networking/v1alpha1/zz_generated.conversion.go b/internal/apis/networking/v1alpha1/zz_generated.conversion.go index 6231d2651..ac08563c3 100644 --- a/internal/apis/networking/v1alpha1/zz_generated.conversion.go +++ b/internal/apis/networking/v1alpha1/zz_generated.conversion.go @@ -1413,6 +1413,7 @@ func Convert_networking_NetworkPolicyStatus_To_v1alpha1_NetworkPolicyStatus(in * func autoConvert_v1alpha1_NetworkSpec_To_networking_NetworkSpec(in *v1alpha1.NetworkSpec, out *networking.NetworkSpec, s conversion.Scope) error { out.ProviderID = in.ProviderID + out.InternetGateway = in.InternetGateway out.Peerings = *(*[]networking.NetworkPeering)(unsafe.Pointer(&in.Peerings)) out.PeeringClaimRefs = *(*[]networking.NetworkPeeringClaimRef)(unsafe.Pointer(&in.PeeringClaimRefs)) return nil @@ -1425,6 +1426,7 @@ func Convert_v1alpha1_NetworkSpec_To_networking_NetworkSpec(in *v1alpha1.Network func autoConvert_networking_NetworkSpec_To_v1alpha1_NetworkSpec(in *networking.NetworkSpec, out *v1alpha1.NetworkSpec, s conversion.Scope) error { out.ProviderID = in.ProviderID + out.InternetGateway = in.InternetGateway out.Peerings = *(*[]v1alpha1.NetworkPeering)(unsafe.Pointer(&in.Peerings)) out.PeeringClaimRefs = *(*[]v1alpha1.NetworkPeeringClaimRef)(unsafe.Pointer(&in.PeeringClaimRefs)) return nil diff --git a/poollet/irievent/generator.go b/poollet/irievent/generator.go index 6650fdd8a..9813518c7 100644 --- a/poollet/irievent/generator.go +++ b/poollet/irievent/generator.go @@ -130,7 +130,7 @@ type GeneratorOptions struct { func setGeneratorOptionsDefaults(o *GeneratorOptions) { if o.ChannelCapacity == 0 { - o.ChannelCapacity = 1024 + o.ChannelCapacity = 8192 } if o.RelistPeriod <= 0 { o.RelistPeriod = 1 * time.Second