Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migration of osc fixes done in onmetal-api #1033

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 14 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
4 changes: 4 additions & 0 deletions api/networking/v1alpha1/network_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 6 additions & 2 deletions broker/machinebroker/server/machine_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{}
Expand All @@ -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
}
}
}

Expand Down
3 changes: 3 additions & 0 deletions client-go/applyconfigurations/internal/internal.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions client-go/openapi/zz_generated.openapi.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions docs/api-reference/compute.md
Original file line number Diff line number Diff line change
Expand Up @@ -1178,6 +1178,9 @@ MachinePool.</p>
</tr><tr><td><p>&#34;Terminated&#34;</p></td>
<td><p>MachineStateTerminated means the machine has been permanently stopped and cannot be started.</p>
</td>
</tr><tr><td><p>&#34;Terminating&#34;</p></td>
<td><p>MachineStateTerminating means the machine that is terminating.</p>
</td>
</tr></tbody>
</table>
<h3 id="compute.ironcore.dev/v1alpha1.MachineStatus">MachineStatus
Expand Down
58 changes: 58 additions & 0 deletions docs/api-reference/networking.md
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,17 @@ string
</tr>
<tr>
<td>
<code>internetGateway</code><br/>
<em>
bool
</em>
</td>
<td>
<p>InternetGateway is a flag that indicates whether the network has an internet gateway.</p>
</td>
</tr>
<tr>
<td>
<code>peerings</code><br/>
<em>
<a href="#networking.ironcore.dev/v1alpha1.NetworkPeering">
Expand Down Expand Up @@ -2003,6 +2014,29 @@ string
</tr>
</tbody>
</table>
<h3 id="networking.ironcore.dev/v1alpha1.NetworkPeeringState">NetworkPeeringState
(<code>string</code> alias)</h3>
<p>
(<em>Appears on:</em><a href="#networking.ironcore.dev/v1alpha1.NetworkPeeringStatus">NetworkPeeringStatus</a>)
</p>
<div>
<p>NetworkPeeringState is the state a NetworkPeering can be in</p>
</div>
<table>
<thead>
<tr>
<th>Value</th>
<th>Description</th>
</tr>
</thead>
<tbody><tr><td><p>&#34;Applied&#34;</p></td>
<td><p>NetworkPeeringStateApplied signals that the network peering is applied.</p>
</td>
</tr><tr><td><p>&#34;Pending&#34;</p></td>
<td><p>NetworkPeeringStatePending signals that the network peering is not applied.</p>
</td>
</tr></tbody>
</table>
<h3 id="networking.ironcore.dev/v1alpha1.NetworkPeeringStatus">NetworkPeeringStatus
</h3>
<p>
Expand Down Expand Up @@ -2030,6 +2064,19 @@ string
<p>Name is the name of the network peering.</p>
</td>
</tr>
<tr>
<td>
<code>state</code><br/>
<em>
<a href="#networking.ironcore.dev/v1alpha1.NetworkPeeringState">
NetworkPeeringState
</a>
</em>
</td>
<td>
<p>State represents the network peering state</p>
</td>
</tr>
</tbody>
</table>
<h3 id="networking.ironcore.dev/v1alpha1.NetworkPolicyCondition">NetworkPolicyCondition
Expand Down Expand Up @@ -2472,6 +2519,17 @@ string
</tr>
<tr>
<td>
<code>internetGateway</code><br/>
<em>
bool
</em>
</td>
<td>
<p>InternetGateway is a flag that indicates whether the network has an internet gateway.</p>
</td>
</tr>
<tr>
<td>
<code>peerings</code><br/>
<em>
<a href="#networking.ironcore.dev/v1alpha1.NetworkPeering">
Expand Down
4 changes: 4 additions & 0 deletions internal/apis/networking/network_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions internal/apis/networking/v1alpha1/zz_generated.conversion.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion poollet/irievent/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading