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.
+internetGateway
InternetGateway is a flag that indicates whether the network has an internet gateway.
+peerings
string
alias)+(Appears on:NetworkPeeringStatus) +
+NetworkPeeringState is the state a NetworkPeering can be in
+Value | +Description | +
---|---|
"Applied" |
+NetworkPeeringStateApplied signals that the network peering is applied. + |
+
"Pending" |
+NetworkPeeringStatePending signals that the network peering is not applied. + |
+
@@ -2030,6 +2064,19 @@ string
Name is the name of the network peering.
+state
State represents the network peering state
+internetGateway
InternetGateway is a flag that indicates whether the network has an internet gateway.
+peerings