diff --git a/Dockerfile b/Dockerfile index 04f204c1..64043491 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,16 +8,10 @@ COPY go.sum go.sum COPY hack hack -ENV GOPRIVATE='github.com/onmetal/*' - # cache deps before building and copying source so that we don't need to re-download as much # and so that source changes don't invalidate our downloaded layer -RUN --mount=type=ssh --mount=type=secret,id=github_pat \ - --mount=type=cache,target=/root/.cache/go-build \ +RUN --mount=type=cache,target=/root/.cache/go-build \ --mount=type=cache,target=/go/pkg \ - GITHUB_PAT_PATH=/run/secrets/github_pat ./hack/setup-git-redirect.sh \ - && mkdir -p -m 0600 ~/.ssh \ - && ssh-keyscan github.com >> ~/.ssh/known_hosts \ && go mod download # Copy the go source diff --git a/Makefile b/Makefile index fc80a91c..31f30920 100644 --- a/Makefile +++ b/Makefile @@ -120,6 +120,10 @@ extract-openapi: envtest openapi-extractor --apiservices="./config/apiserver/apiservice/bases" \ --output="./gen" +.PHONY: docs +docs: gen-crd-api-reference-docs ## Run go generate to generate API reference documentation. + $(GEN_CRD_API_REFERENCE_DOCS) -api-dir ./api/core/v1alpha1 -config ./hack/api-reference/config.json -template-dir ./hack/api-reference/template -out-file ./docs/api-reference/core.md + ##@ Build .PHONY: build-ironcore-net @@ -445,7 +449,7 @@ $(ENVTEST): $(LOCALBIN) .PHONY: openapi-extractor openapi-extractor: $(OPENAPI_EXTRACTOR) ## Download openapi-extractor locally if necessary. $(OPENAPI_EXTRACTOR): $(LOCALBIN) - test -s $(LOCALBIN)/openapi-extractor || GOBIN=$(LOCALBIN) go install github.com/onmetal/openapi-extractor/cmd/openapi-extractor@latest + test -s $(LOCALBIN)/openapi-extractor || GOBIN=$(LOCALBIN) go install github.com/ironcore-dev/openapi-extractor/cmd/openapi-extractor@latest .PHONY: gen-crd-api-reference-docs gen-crd-api-reference-docs: $(GEN_CRD_API_REFERENCE_DOCS) ## Download gen-crd-api-reference-docs locally if necessary. diff --git a/cmd/metalnetlet/main.go b/cmd/metalnetlet/main.go index 10e02ff7..c3c78aec 100644 --- a/cmd/metalnetlet/main.go +++ b/cmd/metalnetlet/main.go @@ -13,7 +13,7 @@ import ( metalnetletconfig "github.com/ironcore-dev/ironcore-net/metalnetlet/client/config" "github.com/ironcore-dev/ironcore-net/metalnetlet/controllers" "github.com/ironcore-dev/ironcore/utils/client/config" - metalnetv1alpha1 "github.com/onmetal/metalnet/api/v1alpha1" + metalnetv1alpha1 "github.com/ironcore-dev/metalnet/api/v1alpha1" flag "github.com/spf13/pflag" corev1 "k8s.io/api/core/v1" "sigs.k8s.io/controller-runtime/pkg/cluster" diff --git a/config/metalnetlet/rbac/role.yaml b/config/metalnetlet/rbac/role.yaml index 56c3f211..fb5ea1b9 100644 --- a/config/metalnetlet/rbac/role.yaml +++ b/config/metalnetlet/rbac/role.yaml @@ -40,7 +40,7 @@ rules: - update - watch - apiGroups: - - networking.metalnet.onmetal.de + - networking.metalnet.ironcore.dev resources: - loadbalancers verbs: @@ -53,7 +53,7 @@ rules: - update - watch - apiGroups: - - networking.metalnet.onmetal.de + - networking.metalnet.ironcore.dev resources: - networkinterfaces verbs: @@ -66,7 +66,7 @@ rules: - update - watch - apiGroups: - - networking.metalnet.onmetal.de + - networking.metalnet.ironcore.dev resources: - networks verbs: diff --git a/docs/api-reference/core.md b/docs/api-reference/core.md new file mode 100644 index 00000000..42525204 --- /dev/null +++ b/docs/api-reference/core.md @@ -0,0 +1,3770 @@ +

Packages:

+ +

core.apinet.ironcore.dev/v1alpha1

+
+

Package v1alpha1 is the v1alpha1 version of the API.

+
+Resource Types: + +

DaemonSet +

+
+

DaemonSet is the schema for the daemonsets API.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+apiVersion
+string
+ +core.apinet.ironcore.dev/v1alpha1 + +
+kind
+string +
DaemonSet
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+spec
+ + +DaemonSetSpec + + +
+
+
+ + + + + + + + + +
+nodeSelector
+ + +Kubernetes meta/v1.LabelSelector + + +
+

Selector selects all Instance that are managed by this daemon set.

+
+template
+ + +InstanceTemplate + + +
+

Template is the instance template.

+
+
+status
+ + +DaemonSetStatus + + +
+
+

IP +

+
+

IP is the schema for the ips API.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+apiVersion
+string
+ +core.apinet.ironcore.dev/v1alpha1 + +
+kind
+string +
IP
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+spec
+ + +IPSpec + + +
+
+
+ + + + + + + + + + + + + + + + + +
+type
+ + +IPType + + +
+
+ipFamily
+ + +Kubernetes core/v1.IPFamily + + +
+
+ip
+ + +github.com/ironcore-dev/ironcore-net/apimachinery/api/net.IP + + +
+
+claimRef
+ + +IPClaimRef + + +
+
+
+status
+ + +IPStatus + + +
+
+

IPAddress +

+
+

IPAddress is the schema for the ipaddresses API.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+apiVersion
+string
+ +core.apinet.ironcore.dev/v1alpha1 + +
+kind
+string +
IPAddress
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+spec
+ + +IPAddressSpec + + +
+
+
+ + + + + + + + + +
+ip
+ + +github.com/ironcore-dev/ironcore-net/apimachinery/api/net.IP + + +
+
+claimRef
+ + +IPAddressClaimRef + + +
+
+
+

Instance +

+
+

Instance is the schema for the instances API.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+apiVersion
+string
+ +core.apinet.ironcore.dev/v1alpha1 + +
+kind
+string +
Instance
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+spec
+ + +InstanceSpec + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+type
+ + +InstanceType + + +
+

Type specifies the InstanceType to deploy.

+
+loadBalancerType
+ + +LoadBalancerType + + +
+

LoadBalancerType is the load balancer type this instance is for.

+
+networkRef
+ + +Kubernetes core/v1.LocalObjectReference + + +
+

NetworkRef references the network the instance is on.

+
+ips
+ + +[]github.com/ironcore-dev/ironcore-net/apimachinery/api/net.IP + + +
+

IPs are the IPs of the instance.

+
+loadBalancerPorts
+ + +[]LoadBalancerPort + + +
+

LoadBalancerPorts are the load balancer ports of this instance.

+
+affinity
+ + +Affinity + + +
+

Affinity are affinity constraints.

+
+topologySpreadConstraints
+ + +[]TopologySpreadConstraint + + +
+

TopologySpreadConstraints describes how a group of instances ought to spread across topology +domains. Scheduler will schedule instances in a way which abides by the constraints. +All topologySpreadConstraints are ANDed.

+
+nodeRef
+ + +Kubernetes core/v1.LocalObjectReference + + +
+

NodeRef references the node hosting the load balancer instance. +Will be set by the scheduler if empty.

+
+
+status
+ + +InstanceStatus + + +
+
+

LoadBalancer +

+
+

LoadBalancer is the schema for the loadbalancers API.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+apiVersion
+string
+ +core.apinet.ironcore.dev/v1alpha1 + +
+kind
+string +
LoadBalancer
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+spec
+ + +LoadBalancerSpec + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+type
+ + +LoadBalancerType + + +
+

Type specifies the type of load balancer.

+
+networkRef
+ + +Kubernetes core/v1.LocalObjectReference + + +
+

NetworkRef references the network the load balancer is part of.

+
+ips
+ + +[]LoadBalancerIP + + +
+(Optional) +

IPs specifies the IPs of the load balancer.

+
+ports
+ + +[]LoadBalancerPort + + +
+

Ports are the ports the load balancer should allow. +If empty, the load balancer allows all ports.

+
+selector
+ + +Kubernetes meta/v1.LabelSelector + + +
+

Selector selects all Instance that are managed by this daemon set.

+
+template
+ + +InstanceTemplate + + +
+

Template is the instance template.

+
+
+status
+ + +LoadBalancerStatus + + +
+
+

LoadBalancerRouting +

+
+

LoadBalancerRouting is the schema for the loadbalancerroutings API.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+apiVersion
+string
+ +core.apinet.ironcore.dev/v1alpha1 + +
+kind
+string +
LoadBalancerRouting
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+destinations
+ + +[]LoadBalancerDestination + + +
+
+

NATGateway +

+
+

NATGateway is the schema for the natgateways API.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+apiVersion
+string
+ +core.apinet.ironcore.dev/v1alpha1 + +
+kind
+string +
NATGateway
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+spec
+ + +NATGatewaySpec + + +
+
+
+ + + + + + + + + + + + + + + + + +
+ipFamily
+ + +Kubernetes core/v1.IPFamily + + +
+

IPFamily is the IP family of the NAT gateway.

+
+networkRef
+ + +Kubernetes core/v1.LocalObjectReference + + +
+

NetworkRef references the network the NAT gateway is part of.

+
+ips
+ + +[]NATGatewayIP + + +
+(Optional) +

IPs specifies the IPs of the NAT gateway.

+
+portsPerNetworkInterface
+ +int32 + +
+

PortsPerNetworkInterface specifies how many ports to allocate per network interface.

+
+
+status
+ + +NATGatewayStatus + + +
+
+

NATGatewayAutoscaler +

+
+

NATGatewayAutoscaler is the schema for the natgatewayautoscalers API.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+apiVersion
+string
+ +core.apinet.ironcore.dev/v1alpha1 + +
+kind
+string +
NATGatewayAutoscaler
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+spec
+ + +NATGatewayAutoscalerSpec + + +
+
+
+ + + + + + + + + + + + + +
+natGatewayRef
+ + +Kubernetes core/v1.LocalObjectReference + + +
+

NATGatewayRef points to the target NATGateway to scale.

+
+minPublicIPs
+ +int32 + +
+

MinPublicIPs is the minimum number of public IPs to allocate for a NAT Gateway.

+
+maxPublicIPs
+ +int32 + +
+

MaxPublicIPs is the maximum number of public IPs to allocate for a NAT Gateway.

+
+
+status
+ + +NATGatewayAutoscalerStatus + + +
+
+

NATTable +

+
+

NATTable is the schema for the nattables API.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+apiVersion
+string
+ +core.apinet.ironcore.dev/v1alpha1 + +
+kind
+string +
NATTable
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+ips
+ + +[]NATIP + + +
+

IPs specifies how to NAT the IPs for the NAT gateway.

+
+

Network +

+
+

Network is the schema for the networks API.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+apiVersion
+string
+ +core.apinet.ironcore.dev/v1alpha1 + +
+kind
+string +
Network
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+spec
+ + +NetworkSpec + + +
+
+
+ + + + + +
+id
+ +string + +
+

ID is the ID of the network.

+
+
+status
+ + +NetworkStatus + + +
+
+

NetworkID +

+
+

NetworkID is the schema for the networkids API.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+apiVersion
+string
+ +core.apinet.ironcore.dev/v1alpha1 + +
+kind
+string +
NetworkID
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+spec
+ + +NetworkIDSpec + + +
+
+
+ + + + + +
+claimRef
+ + +NetworkIDClaimRef + + +
+
+
+

NetworkInterface +

+
+

NetworkInterface is the schema for the networkinterfaces API.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+apiVersion
+string
+ +core.apinet.ironcore.dev/v1alpha1 + +
+kind
+string +
NetworkInterface
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+spec
+ + +NetworkInterfaceSpec + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+nodeRef
+ + +Kubernetes core/v1.LocalObjectReference + + +
+

NodeRef is the node the network interface is hosted on.

+
+networkRef
+ + +Kubernetes core/v1.LocalObjectReference + + +
+

NetworkRef references the network that the network interface is in.

+
+ips
+ + +[]github.com/ironcore-dev/ironcore-net/apimachinery/api/net.IP + + +
+

IPs are the internal IPs of the network interface.

+
+prefixes
+ + +[]github.com/ironcore-dev/ironcore-net/apimachinery/api/net.IPPrefix + + +
+

Prefixes are additional prefixes to route to the network interface.

+
+natGateways
+ + +[]NetworkInterfaceNAT + + +
+

NATs specify the NAT of the network interface IP family. +Can only be set if there is no matching IP family in PublicIPs.

+
+publicIPs
+ + +[]NetworkInterfacePublicIP + + +
+(Optional) +

PublicIPs are the public IPs the network interface should have.

+
+
+status
+ + +NetworkInterfaceStatus + + +
+
+

Node +

+
+

Node is the schema for the nodes API.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+apiVersion
+string
+ +core.apinet.ironcore.dev/v1alpha1 + +
+kind
+string +
Node
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+spec
+ + +NodeSpec + + +
+
+
+ +
+
+status
+ + +NodeStatus + + +
+
+

Affinity +

+

+(Appears on:InstanceSpec) +

+
+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+nodeAffinity
+ + +NodeAffinity + + +
+
+instanceAntiAffinity
+ + +InstanceAntiAffinity + + +
+
+

DaemonSetSpec +

+

+(Appears on:DaemonSet) +

+
+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+nodeSelector
+ + +Kubernetes meta/v1.LabelSelector + + +
+

Selector selects all Instance that are managed by this daemon set.

+
+template
+ + +InstanceTemplate + + +
+

Template is the instance template.

+
+

DaemonSetStatus +

+

+(Appears on:DaemonSet) +

+
+
+ + + + + + + + + + + + + +
FieldDescription
+collisionCount
+ +int32 + +
+
+

IPAddressClaimRef +

+

+(Appears on:IPAddressSpec) +

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+group
+ +string + +
+
+resource
+ +string + +
+
+namespace
+ +string + +
+
+name
+ +string + +
+
+uid
+ + +k8s.io/apimachinery/pkg/types.UID + + +
+
+

IPAddressSpec +

+

+(Appears on:IPAddress) +

+
+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+ip
+ + +github.com/ironcore-dev/ironcore-net/apimachinery/api/net.IP + + +
+
+claimRef
+ + +IPAddressClaimRef + + +
+
+

IPClaimRef +

+

+(Appears on:IPSpec) +

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+group
+ +string + +
+
+resource
+ +string + +
+
+name
+ +string + +
+
+uid
+ + +k8s.io/apimachinery/pkg/types.UID + + +
+
+

IPSpec +

+

+(Appears on:IP) +

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+type
+ + +IPType + + +
+
+ipFamily
+ + +Kubernetes core/v1.IPFamily + + +
+
+ip
+ + +github.com/ironcore-dev/ironcore-net/apimachinery/api/net.IP + + +
+
+claimRef
+ + +IPClaimRef + + +
+
+

IPStatus +

+

+(Appears on:IP) +

+
+
+

IPType +(string alias)

+

+(Appears on:IPSpec) +

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

"Public"

+

InstanceAffinityTerm +

+

+(Appears on:InstanceAntiAffinity) +

+
+

InstanceAffinityTerm defines a set of instances (namely those matching the labelSelector that this instance should be +co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose +value of the label with key matches that of any node on which a instance of the set of instances is running.

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+labelSelector
+ + +Kubernetes meta/v1.LabelSelector + + +
+

LabelSelector over a set of resources, in this case instances.

+
+topologyKey
+ +string + +
+

TopologyKey indicates that this instance should be co-located (affinity) or not co-located (anti-affinity) +with the instances matching the labelSelector, where co-located is defined as running on a +node whose value of the label with key topologyKey matches that of any node on which any of the +selected instances is running. +Empty topologyKey is not allowed.

+
+

InstanceAntiAffinity +

+

+(Appears on:Affinity) +

+
+
+ + + + + + + + + + + + + +
FieldDescription
+requiredDuringSchedulingIgnoredDuringExecution
+ + +[]InstanceAffinityTerm + + +
+

RequiredDuringSchedulingIgnoredDuringExecution specifies anti-affinity requirements at +scheduling time, that, if not met, will cause the instance not be scheduled onto the node. +When there are multiple elements, the lists of nodes corresponding to each +instanceAffinityTerm are intersected, i.e. all terms must be satisfied.

+
+

InstanceSpec +

+

+(Appears on:Instance, InstanceTemplate) +

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+type
+ + +InstanceType + + +
+

Type specifies the InstanceType to deploy.

+
+loadBalancerType
+ + +LoadBalancerType + + +
+

LoadBalancerType is the load balancer type this instance is for.

+
+networkRef
+ + +Kubernetes core/v1.LocalObjectReference + + +
+

NetworkRef references the network the instance is on.

+
+ips
+ + +[]github.com/ironcore-dev/ironcore-net/apimachinery/api/net.IP + + +
+

IPs are the IPs of the instance.

+
+loadBalancerPorts
+ + +[]LoadBalancerPort + + +
+

LoadBalancerPorts are the load balancer ports of this instance.

+
+affinity
+ + +Affinity + + +
+

Affinity are affinity constraints.

+
+topologySpreadConstraints
+ + +[]TopologySpreadConstraint + + +
+

TopologySpreadConstraints describes how a group of instances ought to spread across topology +domains. Scheduler will schedule instances in a way which abides by the constraints. +All topologySpreadConstraints are ANDed.

+
+nodeRef
+ + +Kubernetes core/v1.LocalObjectReference + + +
+

NodeRef references the node hosting the load balancer instance. +Will be set by the scheduler if empty.

+
+

InstanceStatus +

+

+(Appears on:Instance) +

+
+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+ips
+ + +[]github.com/ironcore-dev/ironcore-net/apimachinery/api/net.IP + + +
+
+collisionCount
+ +int32 + +
+
+

InstanceTemplate +

+

+(Appears on:DaemonSetSpec, LoadBalancerSpec) +

+
+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+spec
+ + +InstanceSpec + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+type
+ + +InstanceType + + +
+

Type specifies the InstanceType to deploy.

+
+loadBalancerType
+ + +LoadBalancerType + + +
+

LoadBalancerType is the load balancer type this instance is for.

+
+networkRef
+ + +Kubernetes core/v1.LocalObjectReference + + +
+

NetworkRef references the network the instance is on.

+
+ips
+ + +[]github.com/ironcore-dev/ironcore-net/apimachinery/api/net.IP + + +
+

IPs are the IPs of the instance.

+
+loadBalancerPorts
+ + +[]LoadBalancerPort + + +
+

LoadBalancerPorts are the load balancer ports of this instance.

+
+affinity
+ + +Affinity + + +
+

Affinity are affinity constraints.

+
+topologySpreadConstraints
+ + +[]TopologySpreadConstraint + + +
+

TopologySpreadConstraints describes how a group of instances ought to spread across topology +domains. Scheduler will schedule instances in a way which abides by the constraints. +All topologySpreadConstraints are ANDed.

+
+nodeRef
+ + +Kubernetes core/v1.LocalObjectReference + + +
+

NodeRef references the node hosting the load balancer instance. +Will be set by the scheduler if empty.

+
+
+

InstanceType +(string alias)

+

+(Appears on:InstanceSpec) +

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

"LoadBalancer"

+

LoadBalancerDestination +

+

+(Appears on:LoadBalancerRouting) +

+
+

LoadBalancerDestination is the destination of the load balancer.

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+ip
+ + +github.com/ironcore-dev/ironcore-net/apimachinery/api/net.IP + + +
+

IP is the target IP.

+
+targetRef
+ + +LoadBalancerTargetRef + + +
+

TargetRef is the target providing the destination.

+
+

LoadBalancerIP +

+

+(Appears on:LoadBalancerSpec) +

+
+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+name
+ +string + +
+

Name is the name of the load balancer IP.

+
+ipFamily
+ + +Kubernetes core/v1.IPFamily + + +
+

IPFamily is the IP family of the IP. Has to match IP if specified. If unspecified and IP is specified, +will be defaulted by using the IP family of IP. +If only IPFamily is specified, a random IP of that family will be allocated if possible.

+
+ip
+ + +github.com/ironcore-dev/ironcore-net/apimachinery/api/net.IP + + +
+

IP specifies a specific IP to allocate. If empty, a random IP will be allocated if possible.

+
+

LoadBalancerPort +

+

+(Appears on:InstanceSpec, LoadBalancerSpec) +

+
+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+protocol
+ + +Kubernetes core/v1.Protocol + + +
+

Protocol is the protocol the load balancer should allow. +If not specified, defaults to TCP.

+
+port
+ +int32 + +
+

Port is the port to allow.

+
+endPort
+ +int32 + +
+

EndPort marks the end of the port range to allow. +If unspecified, only a single port, Port, will be allowed.

+
+

LoadBalancerSpec +

+

+(Appears on:LoadBalancer) +

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+type
+ + +LoadBalancerType + + +
+

Type specifies the type of load balancer.

+
+networkRef
+ + +Kubernetes core/v1.LocalObjectReference + + +
+

NetworkRef references the network the load balancer is part of.

+
+ips
+ + +[]LoadBalancerIP + + +
+(Optional) +

IPs specifies the IPs of the load balancer.

+
+ports
+ + +[]LoadBalancerPort + + +
+

Ports are the ports the load balancer should allow. +If empty, the load balancer allows all ports.

+
+selector
+ + +Kubernetes meta/v1.LabelSelector + + +
+

Selector selects all Instance that are managed by this daemon set.

+
+template
+ + +InstanceTemplate + + +
+

Template is the instance template.

+
+

LoadBalancerStatus +

+

+(Appears on:LoadBalancer) +

+
+
+ + + + + + + + + + + + + +
FieldDescription
+collisionCount
+ +int32 + +
+

CollisionCount is used to construct names for IP addresses for the load balancer.

+
+

LoadBalancerTargetRef +

+

+(Appears on:LoadBalancerDestination) +

+
+

LoadBalancerTargetRef is a load balancer target.

+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+uid
+ + +k8s.io/apimachinery/pkg/types.UID + + +
+

UID is the UID of the target.

+
+name
+ +string + +
+

Name is the name of the target.

+
+nodeRef
+ + +Kubernetes core/v1.LocalObjectReference + + +
+

NodeRef references the node the destination network interface is on.

+
+

LoadBalancerType +(string alias)

+

+(Appears on:InstanceSpec, LoadBalancerSpec) +

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

"Internal"

"Public"

+

NATGatewayAutoscalerSpec +

+

+(Appears on:NATGatewayAutoscaler) +

+
+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+natGatewayRef
+ + +Kubernetes core/v1.LocalObjectReference + + +
+

NATGatewayRef points to the target NATGateway to scale.

+
+minPublicIPs
+ +int32 + +
+

MinPublicIPs is the minimum number of public IPs to allocate for a NAT Gateway.

+
+maxPublicIPs
+ +int32 + +
+

MaxPublicIPs is the maximum number of public IPs to allocate for a NAT Gateway.

+
+

NATGatewayAutoscalerStatus +

+

+(Appears on:NATGatewayAutoscaler) +

+
+
+

NATGatewayIP +

+

+(Appears on:NATGatewaySpec) +

+
+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+name
+ +string + +
+

Name is the semantic name of the NAT gateway IP.

+
+ip
+ + +github.com/ironcore-dev/ironcore-net/apimachinery/api/net.IP + + +
+

IP specifies a specific IP to allocate. If empty, a random IP will be allocated if possible.

+
+

NATGatewaySpec +

+

+(Appears on:NATGateway) +

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+ipFamily
+ + +Kubernetes core/v1.IPFamily + + +
+

IPFamily is the IP family of the NAT gateway.

+
+networkRef
+ + +Kubernetes core/v1.LocalObjectReference + + +
+

NetworkRef references the network the NAT gateway is part of.

+
+ips
+ + +[]NATGatewayIP + + +
+(Optional) +

IPs specifies the IPs of the NAT gateway.

+
+portsPerNetworkInterface
+ +int32 + +
+

PortsPerNetworkInterface specifies how many ports to allocate per network interface.

+
+

NATGatewayStatus +

+

+(Appears on:NATGateway) +

+
+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+usedNATIPs
+ +int64 + +
+

UsedNATIPs is the number of NAT IPs in-use.

+
+requestedNATIPs
+ +int64 + +
+

RequestedNATIPs is the number of requested NAT IPs.

+
+

NATIP +

+

+(Appears on:NATTable) +

+
+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+ip
+ + +github.com/ironcore-dev/ironcore-net/apimachinery/api/net.IP + + +
+

IP is the IP to NAT.

+
+sections
+ + +[]NATIPSection + + +
+

Sections are the sections of the NATIP.

+
+

NATIPSection +

+

+(Appears on:NATIP) +

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+ip
+ + +github.com/ironcore-dev/ironcore-net/apimachinery/api/net.IP + + +
+

IP is the source IP.

+
+port
+ +int32 + +
+

Port is the start port of the section.

+
+endPort
+ +int32 + +
+

EndPort is the end port of the section

+
+targetRef
+ + +NATTableIPTargetRef + + +
+

TargetRef references the entity having the IP.

+
+

NATTableIPTargetRef +

+

+(Appears on:NATIPSection) +

+
+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+uid
+ + +k8s.io/apimachinery/pkg/types.UID + + +
+

UID is the UID of the target.

+
+name
+ +string + +
+

Name is the name of the target.

+
+nodeRef
+ + +Kubernetes core/v1.LocalObjectReference + + +
+

NodeRef references the node the destination network interface is on.

+
+

NetworkIDClaimRef +

+

+(Appears on:NetworkIDSpec) +

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+group
+ +string + +
+
+resource
+ +string + +
+
+namespace
+ +string + +
+
+name
+ +string + +
+
+uid
+ + +k8s.io/apimachinery/pkg/types.UID + + +
+
+

NetworkIDSpec +

+

+(Appears on:NetworkID) +

+
+
+ + + + + + + + + + + + + +
FieldDescription
+claimRef
+ + +NetworkIDClaimRef + + +
+
+

NetworkInterfaceNAT +

+

+(Appears on:NetworkInterfaceSpec) +

+
+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+ipFamily
+ + +Kubernetes core/v1.IPFamily + + +
+

IPFamily is the IP family of the handling NAT gateway.

+
+claimRef
+ + +NetworkInterfaceNATClaimRef + + +
+

ClaimRef references the NAT claim handling the network interface’s NAT.

+
+

NetworkInterfaceNATClaimRef +

+

+(Appears on:NetworkInterfaceNAT) +

+
+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+name
+ +string + +
+

Name is the name of the claiming NAT gateway.

+
+uid
+ + +k8s.io/apimachinery/pkg/types.UID + + +
+

UID is the uid of the claiming NAT gateway.

+
+

NetworkInterfacePublicIP +

+

+(Appears on:NetworkInterfaceSpec) +

+
+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+name
+ +string + +
+

Name is the semantic name of the network interface public IP.

+
+ipFamily
+ + +Kubernetes core/v1.IPFamily + + +
+

IPFamily is the IP family of the IP. Has to match IP if specified. If unspecified and IP is specified, +will be defaulted by using the IP family of IP. +If only IPFamily is specified, a random IP of that family will be allocated if possible.

+
+ip
+ + +github.com/ironcore-dev/ironcore-net/apimachinery/api/net.IP + + +
+

IP specifies a specific IP to allocate. If empty, a random ephemeral IP will be allocated.

+
+

NetworkInterfaceSpec +

+

+(Appears on:NetworkInterface) +

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+nodeRef
+ + +Kubernetes core/v1.LocalObjectReference + + +
+

NodeRef is the node the network interface is hosted on.

+
+networkRef
+ + +Kubernetes core/v1.LocalObjectReference + + +
+

NetworkRef references the network that the network interface is in.

+
+ips
+ + +[]github.com/ironcore-dev/ironcore-net/apimachinery/api/net.IP + + +
+

IPs are the internal IPs of the network interface.

+
+prefixes
+ + +[]github.com/ironcore-dev/ironcore-net/apimachinery/api/net.IPPrefix + + +
+

Prefixes are additional prefixes to route to the network interface.

+
+natGateways
+ + +[]NetworkInterfaceNAT + + +
+

NATs specify the NAT of the network interface IP family. +Can only be set if there is no matching IP family in PublicIPs.

+
+publicIPs
+ + +[]NetworkInterfacePublicIP + + +
+(Optional) +

PublicIPs are the public IPs the network interface should have.

+
+

NetworkInterfaceState +(string alias)

+

+(Appears on:NetworkInterfaceStatus) +

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

"Error"

NetworkInterfaceStateError is used for any NetworkInterface that is some error occurred.

+

"Pending"

NetworkInterfaceStatePending is used for any NetworkInterface that is in an intermediate state.

+

"Ready"

NetworkInterfaceStateReady is used for any NetworkInterface that is ready.

+
+

NetworkInterfaceStatus +

+

+(Appears on:NetworkInterface) +

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+state
+ + +NetworkInterfaceState + + +
+
+pciAddress
+ + +PCIAddress + + +
+
+prefixes
+ + +[]github.com/ironcore-dev/ironcore-net/apimachinery/api/net.IPPrefix + + +
+
+publicIPs
+ + +[]github.com/ironcore-dev/ironcore-net/apimachinery/api/net.IP + + +
+
+natIPs
+ + +[]github.com/ironcore-dev/ironcore-net/apimachinery/api/net.IP + + +
+
+

NetworkSpec +

+

+(Appears on:Network) +

+
+
+ + + + + + + + + + + + + +
FieldDescription
+id
+ +string + +
+

ID is the ID of the network.

+
+

NetworkStatus +

+

+(Appears on:Network) +

+
+
+

NodeAffinity +

+

+(Appears on:Affinity) +

+
+
+ + + + + + + + + + + + + +
FieldDescription
+requiredDuringSchedulingIgnoredDuringExecution
+ + +NodeSelector + + +
+
+

NodeSelector +

+

+(Appears on:NodeAffinity) +

+
+

NodeSelector represents the union of the results of one or more queries +over a set of nodes; that is, it represents the OR of the selectors represented +by the node selector terms.

+
+ + + + + + + + + + + + + +
FieldDescription
+nodeSelectorTerms
+ + +[]NodeSelectorTerm + + +
+

Required. A list of node selector terms. The terms are ORed.

+
+

NodeSelectorOperator +(string alias)

+

+(Appears on:NodeSelectorRequirement) +

+
+

NodeSelectorOperator is the set of operators that can be used in +a node selector requirement.

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

"DoesNotExist"

"Exists"

"Gt"

"In"

"Lt"

"NotIn"

+

NodeSelectorRequirement +

+

+(Appears on:NodeSelectorTerm) +

+
+

NodeSelectorRequirement is a requirement for a selector. It’s a combination of the key to match, the operator +to match with, and zero to n values, depending on the operator.

+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+key
+ +string + +
+

Key is the key the selector applies to.

+
+operator
+ + +NodeSelectorOperator + + +
+

Operator represents the key’s relationship to the values. +Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.

+
+values
+ +[]string + +
+

Values are the values to relate the key to via the operator.

+
+

NodeSelectorTerm +

+

+(Appears on:NodeSelector) +

+
+

NodeSelectorTerm matches no objects if it’s empty. The requirements of the selector are ANDed.

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+matchExpressions
+ + +[]NodeSelectorRequirement + + +
+

MatchExpressions matches nodes by the label selector requirements.

+
+matchFields
+ + +[]NodeSelectorRequirement + + +
+

MatchFields matches the nodes by their fields.

+
+

NodeSpec +

+

+(Appears on:Node) +

+
+
+

NodeStatus +

+

+(Appears on:Node) +

+
+
+

PCIAddress +

+

+(Appears on:NetworkInterfaceStatus) +

+
+

PCIAddress is a PCI address.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+domain
+ +string + +
+
+bus
+ +string + +
+
+slot
+ +string + +
+
+function
+ +string + +
+
+

TopologySpreadConstraint +

+

+(Appears on:InstanceSpec) +

+
+

TopologySpreadConstraint specifies how to spread matching instances among the given topology.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+maxSkew
+ +int32 + +
+

MaxSkew describes the degree to which instances may be unevenly distributed. +When whenUnsatisfiable=DoNotSchedule, it is the maximum permitted difference +between the number of matching instances in the target topology and the global minimum. +The global minimum is the minimum number of matching instances in an eligible domain +or zero if the number of eligible domains is less than MinDomains.

+
+topologyKey
+ +string + +
+

TopologyKey is the key of node labels. Nodes that have a label with this key +and identical values are considered to be in the same topology. +We consider each as a “bucket”, and try to put balanced number +of instances into each bucket. +We define a domain as a particular instance of a topology. +Also, we define an eligible domain as a domain whose nodes meet the requirements of +nodeAffinityPolicy and nodeTaintsPolicy.

+
+whenUnsatisfiable
+ + +UnsatisfiableConstraintAction + + +
+

WhenUnsatisfiable indicates how to deal with a instance if it doesn’t satisfy +the spread constraint. +- DoNotSchedule (default) tells the scheduler not to schedule it. +- ScheduleAnyway tells the scheduler to schedule the instance in any location, +but giving higher precedence to topologies that would help reduce the +skew.

+
+labelSelector
+ + +Kubernetes meta/v1.LabelSelector + + +
+

LabelSelector is used to find matching instances. +Instances that match this label selector are counted to determine the number of instances +in their corresponding topology domain.

+
+

UnsatisfiableConstraintAction +(string alias)

+

+(Appears on:TopologySpreadConstraint) +

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

"DoNotSchedule"

DoNotSchedule instructs the scheduler not to schedule the instance +when constraints are not satisfied.

+
+
+

+Generated with gen-crd-api-reference-docs +

diff --git a/go.mod b/go.mod index 7162132e..c36104ff 100644 --- a/go.mod +++ b/go.mod @@ -7,9 +7,9 @@ require ( github.com/go-logr/logr v1.3.0 github.com/google/uuid v1.3.1 github.com/ironcore-dev/controller-utils v0.9.0 - github.com/ironcore-dev/ironcore v0.1.2-0.20231120151107-b5c3fa09890e - github.com/onmetal/metalnet v0.1.8 - github.com/onsi/ginkgo/v2 v2.13.1 + github.com/ironcore-dev/ironcore v0.1.2-0.20231130105619-82b2d4e911ad + github.com/ironcore-dev/metalnet v0.1.10-0.20231207142716-2470d3ecd5bc + github.com/onsi/ginkgo/v2 v2.13.2 github.com/onsi/gomega v1.30.0 github.com/spf13/cobra v1.8.0 github.com/spf13/pflag v1.0.5 @@ -92,7 +92,7 @@ require ( golang.org/x/net v0.17.0 // indirect golang.org/x/oauth2 v0.11.0 // indirect golang.org/x/sync v0.5.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/sys v0.15.0 // indirect golang.org/x/term v0.13.0 // indirect golang.org/x/text v0.13.0 // indirect golang.org/x/time v0.3.0 // indirect diff --git a/go.sum b/go.sum index d7a02e59..069d17bb 100644 --- a/go.sum +++ b/go.sum @@ -114,8 +114,10 @@ github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2 github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/ironcore-dev/controller-utils v0.9.0 h1:q8Ljk6UIS6WB0J/k/hVV13umHUn/Bfr2+PxdZls1C8U= github.com/ironcore-dev/controller-utils v0.9.0/go.mod h1:06mPYdYCdjGHVz/msCG/MyDjPdOufRkUd4GaTqkzZwg= -github.com/ironcore-dev/ironcore v0.1.2-0.20231120151107-b5c3fa09890e h1:cSyFlivFnDmttgIzOa7gWbX+bM/RWCcW2QDtVNiUx3U= -github.com/ironcore-dev/ironcore v0.1.2-0.20231120151107-b5c3fa09890e/go.mod h1:6Bgdlhmo2vNiCfdRwwQJBKIrPall0UPho3xmYQ/6ZY4= +github.com/ironcore-dev/ironcore v0.1.2-0.20231130105619-82b2d4e911ad h1:n7fk+Ep1IodKbJ1umJwYk/HyUGmHeywZsxRGUdVJRHw= +github.com/ironcore-dev/ironcore v0.1.2-0.20231130105619-82b2d4e911ad/go.mod h1:UPp+izBNxBhgVa0ts6TxhgV9yFkFVy6+d2T9fsi92uY= +github.com/ironcore-dev/metalnet v0.1.10-0.20231207142716-2470d3ecd5bc h1:zzNLbmYUcPOfaMc3y3Y+AAPu19/VL7/dlsFGXbOEOpw= +github.com/ironcore-dev/metalnet v0.1.10-0.20231207142716-2470d3ecd5bc/go.mod h1:X6WrRIuzuLPVTp9Sm4GWFN2Fsk36kpsb9PwnN03ei/0= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jonboulle/clockwork v0.2.2 h1:UOGuzwb1PwsrDAObMuhUnj0p5ULPj8V/xJ7Kx9qUBdQ= github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= @@ -144,10 +146,8 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/onmetal/metalnet v0.1.8 h1:u79ym5c9gdgVbvwVMvrVuJFRGh3ICNnISRiMazX+wzk= -github.com/onmetal/metalnet v0.1.8/go.mod h1:qmow/RHK+gtFSOFZ5IMqCr39feiWMTp5G23FtxznMpw= -github.com/onsi/ginkgo/v2 v2.13.1 h1:LNGfMbR2OVGBfXjvRZIZ2YCTQdGKtPLvuI1rMCCj3OU= -github.com/onsi/ginkgo/v2 v2.13.1/go.mod h1:XStQ8QcGwLyF4HdfcZB8SFOS/MWCgDuXMSBe6zrvLgM= +github.com/onsi/ginkgo/v2 v2.13.2 h1:Bi2gGVkfn6gQcjNjZJVO8Gf0FHzMPf2phUei9tejVMs= +github.com/onsi/ginkgo/v2 v2.13.2/go.mod h1:XStQ8QcGwLyF4HdfcZB8SFOS/MWCgDuXMSBe6zrvLgM= github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8= github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -283,8 +283,8 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= diff --git a/hack/api-reference/config.json b/hack/api-reference/config.json new file mode 100644 index 00000000..736e7443 --- /dev/null +++ b/hack/api-reference/config.json @@ -0,0 +1,36 @@ +{ + "hideMemberFields": [ + "TypeMeta" + ], + "hideTypePatterns": [ + "ParseError$", + "List$" + ], + "externalPackages": [ + { + "typeMatchPrefix": "^net/netip", + "docsURLTemplate": "https://pkg.go.dev/net/netip#{{.TypeIdentifier}}" + }, + { + "typeMatchPrefix": "^k8s\\.io/apimachinery/pkg/api/resource", + "docsURLTemplate": "https://pkg.go.dev/k8s.io/apimachinery/pkg/api/resource#{{.TypeIdentifier}}" + }, + { + "typeMatchPrefix": "^k8s\\.io/apimachinery/pkg/types", + "docsURLTemplate": "https://pkg.go.dev/k8s.io/apimachinery/pkg/types#{{.TypeIdentifier}}" + }, + { + "typeMatchPrefix": "^k8s\\.io/(api|apimachinery/pkg/apis)/", + "docsURLTemplate": "https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#{{lower .TypeIdentifier}}-{{arrIndex .PackageSegments -1}}-{{arrIndex .PackageSegments -2}}" + }, + { + "typeMatchPrefix": "^github\\.com/ironcore-dev/ironcore-net/apimachinery/api", + "docsURLTemplate": "../{{arrIndex .PackageSegments -2}}/#{{arrIndex .PackageSegments -2}}.ironcore.dev/{{arrIndex .PackageSegments -1}}.{{.TypeIdentifier}}" + } + ], + "typeDisplayNamePrefixOverrides": { + "k8s.io/api/": "Kubernetes ", + "k8s.io/apimachinery/pkg/apis/": "Kubernetes " + }, + "markdownDisabled": false +} diff --git a/hack/api-reference/template/members.tpl b/hack/api-reference/template/members.tpl new file mode 100644 index 00000000..a529c671 --- /dev/null +++ b/hack/api-reference/template/members.tpl @@ -0,0 +1,48 @@ +{{ define "members" }} + +{{ range .Members }} +{{ if not (hiddenMember .)}} + + + {{ fieldName . }}
+ + {{ if linkForType .Type }} + + {{ typeDisplayName .Type }} + + {{ else }} + {{ typeDisplayName .Type }} + {{ end }} + + + + {{ if fieldEmbedded . }} +

+ (Members of {{ fieldName . }} are embedded into this type.) +

+ {{ end}} + + {{ if isOptionalMember .}} + (Optional) + {{ end }} + + {{ safe (renderComments .CommentLines) }} + + {{ if and (eq (.Type.Name.Name) "ObjectMeta") }} + Refer to the Kubernetes API documentation for the fields of the + metadata field. + {{ end }} + + {{ if or (eq (fieldName .) "spec") }} +
+
+ + {{ template "members" .Type }} +
+ {{ end }} + + +{{ end }} +{{ end }} + +{{ end }} diff --git a/hack/api-reference/template/pkg.tpl b/hack/api-reference/template/pkg.tpl new file mode 100644 index 00000000..14eae298 --- /dev/null +++ b/hack/api-reference/template/pkg.tpl @@ -0,0 +1,48 @@ +{{ define "packages" }} + +{{ with .packages}} +

Packages:

+ +{{ end}} + +{{ range .packages }} +

+ {{- packageDisplayName . -}} +

+ + {{ with (index .GoPackages 0 )}} + {{ with .DocComments }} +
+ {{ safe (renderComments .) }} +
+ {{ end }} + {{ end }} + + Resource Types: + + + {{ range (visibleTypes (sortedTypes .Types))}} + {{ template "type" . }} + {{ end }} +
+{{ end }} + +

+ Generated with gen-crd-api-reference-docs +

+ +{{ end }} diff --git a/hack/api-reference/template/placeholder.go b/hack/api-reference/template/placeholder.go new file mode 100644 index 00000000..e5744280 --- /dev/null +++ b/hack/api-reference/template/placeholder.go @@ -0,0 +1,5 @@ +// SPDX-FileCopyrightText: 2023 SAP SE or an SAP affiliate company and IronCore contributors +// SPDX-License-Identifier: Apache-2.0 + +// Package template Placeholder file to make Go vendor this directory properly. +package template diff --git a/hack/api-reference/template/type.tpl b/hack/api-reference/template/type.tpl new file mode 100644 index 00000000..8f0d66b8 --- /dev/null +++ b/hack/api-reference/template/type.tpl @@ -0,0 +1,81 @@ +{{ define "type" }} + +

+ {{- .Name.Name }} + {{ if eq .Kind "Alias" }}({{.Underlying}} alias){{ end -}} +

+{{ with (typeReferences .) }} +

+ (Appears on: + {{- $prev := "" -}} + {{- range . -}} + {{- if $prev -}}, {{ end -}} + {{- $prev = . -}} + {{ typeDisplayName . }} + {{- end -}} + ) +

+{{ end }} + +
+ {{ safe (renderComments .CommentLines) }} +
+ +{{ with (constantsOfType .) }} + + + + + + + + + {{- range . -}} + + {{- /* + renderComments implicitly creates a

element, so we + add one to the display name as well to make the contents + of the two cells align evenly. + */ -}} +

+ + + {{- end -}} + +
ValueDescription

{{ typeDisplayName . }}

{{ safe (renderComments .CommentLines) }}
+{{ end }} + +{{ if .Members }} + + + + + + + + + {{ if isExportedType . }} + + + + + + + + + {{ end }} + {{ template "members" .}} + +
FieldDescription
+ apiVersion
+ string
+ + {{apiGroup .}} + +
+ kind
+ string +
{{.Name.Name}}
+{{ end }} + +{{ end }} diff --git a/metalnetlet/controllers/controllers_suite_test.go b/metalnetlet/controllers/controllers_suite_test.go index c8136de1..ee35cd15 100644 --- a/metalnetlet/controllers/controllers_suite_test.go +++ b/metalnetlet/controllers/controllers_suite_test.go @@ -16,7 +16,7 @@ import ( utilsenvtest "github.com/ironcore-dev/ironcore/utils/envtest" "github.com/ironcore-dev/ironcore/utils/envtest/apiserver" . "github.com/ironcore-dev/ironcore/utils/testing" - metalnetv1alpha1 "github.com/onmetal/metalnet/api/v1alpha1" + metalnetv1alpha1 "github.com/ironcore-dev/metalnet/api/v1alpha1" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" corev1 "k8s.io/api/core/v1" @@ -82,7 +82,7 @@ var _ = BeforeSuite(func() { By("bootstrapping test environment") testEnv = &envtest.Environment{ CRDDirectoryPaths: []string{ - filepath.Join(modutils.Dir("github.com/onmetal/metalnet", "config", "crd", "bases")), + filepath.Join(modutils.Dir("github.com/ironcore-dev/metalnet", "config", "crd", "bases")), }, ErrorIfCRDPathMissing: true, } diff --git a/metalnetlet/controllers/conversion.go b/metalnetlet/controllers/conversion.go index a3e9680f..bfce3155 100644 --- a/metalnetlet/controllers/conversion.go +++ b/metalnetlet/controllers/conversion.go @@ -11,7 +11,7 @@ import ( "github.com/ironcore-dev/ironcore-net/apimachinery/api/net" "github.com/ironcore-dev/ironcore/utils/generic" utilslices "github.com/ironcore-dev/ironcore/utils/slices" - metalnetv1alpha1 "github.com/onmetal/metalnet/api/v1alpha1" + metalnetv1alpha1 "github.com/ironcore-dev/metalnet/api/v1alpha1" corev1 "k8s.io/api/core/v1" ) @@ -98,7 +98,7 @@ func loadBalancerPortsToMetalnetLoadBalancerPorts(ports []v1alpha1.LoadBalancerP // workaroundMetalnetNoIPv6VirtualIPSupportIPsToIP works around the missing public IPv6 support in metalnet // by propagating only IPv4 addresses to metalnet. -// TODO: Remove this as soon as https://github.com/onmetal/metalnet/issues/53 is resolved. +// TODO: Remove this as soon as https://github.com/ironcore-dev/metalnet/issues/53 is resolved. func workaroundMetalnetNoIPv6VirtualIPSupportIPsToIP(metalnetVirtualIPs []metalnetv1alpha1.IP) *metalnetv1alpha1.IP { for _, metalnetVirtualIP := range metalnetVirtualIPs { if metalnetVirtualIP.Is4() { diff --git a/metalnetlet/controllers/instance_controller.go b/metalnetlet/controllers/instance_controller.go index 62770d19..7fd74a73 100644 --- a/metalnetlet/controllers/instance_controller.go +++ b/metalnetlet/controllers/instance_controller.go @@ -17,7 +17,7 @@ import ( metalnetletclient "github.com/ironcore-dev/ironcore-net/metalnetlet/client" utilhandler "github.com/ironcore-dev/ironcore-net/metalnetlet/handler" "github.com/ironcore-dev/ironcore/utils/generic" - metalnetv1alpha1 "github.com/onmetal/metalnet/api/v1alpha1" + metalnetv1alpha1 "github.com/ironcore-dev/metalnet/api/v1alpha1" "golang.org/x/exp/slices" corev1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" @@ -48,7 +48,7 @@ type InstanceReconciler struct { //+kubebuilder:rbac:groups=core.apinet.ironcore.dev,resources=instances/status,verbs=get;update;patch //+kubebuilder:rbac:groups=core.apinet.ironcore.dev,resources=networks,verbs=get;list;watch -//+cluster=metalnet:kubebuilder:rbac:groups=networking.metalnet.onmetal.de,resources=loadbalancers,verbs=get;list;watch;create;update;patch;delete;deletecollection +//+cluster=metalnet:kubebuilder:rbac:groups=networking.metalnet.ironcore.dev,resources=loadbalancers,verbs=get;list;watch;create;update;patch;delete;deletecollection func (r *InstanceReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { log := ctrl.LoggerFrom(ctx) diff --git a/metalnetlet/controllers/instance_controller_test.go b/metalnetlet/controllers/instance_controller_test.go index 65d32874..1842c898 100644 --- a/metalnetlet/controllers/instance_controller_test.go +++ b/metalnetlet/controllers/instance_controller_test.go @@ -7,7 +7,7 @@ import ( "github.com/ironcore-dev/ironcore-net/api/core/v1alpha1" "github.com/ironcore-dev/ironcore-net/apimachinery/api/net" . "github.com/ironcore-dev/ironcore/utils/testing" - metalnetv1alpha1 "github.com/onmetal/metalnet/api/v1alpha1" + metalnetv1alpha1 "github.com/ironcore-dev/metalnet/api/v1alpha1" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" corev1 "k8s.io/api/core/v1" diff --git a/metalnetlet/controllers/metalnetnode_controller.go b/metalnetlet/controllers/metalnetnode_controller.go index a6b9002c..93dc03a6 100644 --- a/metalnetlet/controllers/metalnetnode_controller.go +++ b/metalnetlet/controllers/metalnetnode_controller.go @@ -11,7 +11,7 @@ import ( "github.com/ironcore-dev/controller-utils/clientutils" "github.com/ironcore-dev/ironcore-net/api/core/v1alpha1" "github.com/ironcore-dev/ironcore/utils/maps" - metalnetv1alpha1 "github.com/onmetal/metalnet/api/v1alpha1" + metalnetv1alpha1 "github.com/ironcore-dev/metalnet/api/v1alpha1" corev1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/metalnetlet/controllers/network_controller.go b/metalnetlet/controllers/network_controller.go index f4ebf600..2d1d340e 100644 --- a/metalnetlet/controllers/network_controller.go +++ b/metalnetlet/controllers/network_controller.go @@ -13,7 +13,7 @@ import ( metalnetletclient "github.com/ironcore-dev/ironcore-net/metalnetlet/client" metalnetlethandler "github.com/ironcore-dev/ironcore-net/metalnetlet/handler" "github.com/ironcore-dev/ironcore-net/networkid" - metalnetv1alpha1 "github.com/onmetal/metalnet/api/v1alpha1" + metalnetv1alpha1 "github.com/ironcore-dev/metalnet/api/v1alpha1" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ctrl "sigs.k8s.io/controller-runtime" @@ -36,7 +36,7 @@ type NetworkReconciler struct { //+kubebuilder:rbac:groups=core.apinet.ironcore.dev,resources=networks,verbs=get;list;watch;update;patch //+kubebuilder:rbac:groups=core.apinet.ironcore.dev,resources=networks/finalizers,verbs=update;patch -//+cluster=metalnet:kubebuilder:rbac:groups=networking.metalnet.onmetal.de,resources=networks,verbs=get;list;watch;create;update;patch;delete;deletecollection +//+cluster=metalnet:kubebuilder:rbac:groups=networking.metalnet.ironcore.dev,resources=networks,verbs=get;list;watch;create;update;patch;delete;deletecollection func (r *NetworkReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { log := ctrl.LoggerFrom(ctx) diff --git a/metalnetlet/controllers/network_controller_test.go b/metalnetlet/controllers/network_controller_test.go index b9a8e4a0..baf8c24d 100644 --- a/metalnetlet/controllers/network_controller_test.go +++ b/metalnetlet/controllers/network_controller_test.go @@ -7,7 +7,7 @@ import ( "github.com/ironcore-dev/ironcore-net/api/core/v1alpha1" "github.com/ironcore-dev/ironcore-net/networkid" . "github.com/ironcore-dev/ironcore/utils/testing" - metalnetv1alpha1 "github.com/onmetal/metalnet/api/v1alpha1" + metalnetv1alpha1 "github.com/ironcore-dev/metalnet/api/v1alpha1" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/metalnetlet/controllers/networkinterface_controller.go b/metalnetlet/controllers/networkinterface_controller.go index 051ea34d..6dc8be97 100644 --- a/metalnetlet/controllers/networkinterface_controller.go +++ b/metalnetlet/controllers/networkinterface_controller.go @@ -14,7 +14,7 @@ import ( metalnetletclient "github.com/ironcore-dev/ironcore-net/metalnetlet/client" utilhandler "github.com/ironcore-dev/ironcore-net/metalnetlet/handler" utilslices "github.com/ironcore-dev/ironcore/utils/slices" - metalnetv1alpha1 "github.com/onmetal/metalnet/api/v1alpha1" + metalnetv1alpha1 "github.com/ironcore-dev/metalnet/api/v1alpha1" "golang.org/x/exp/slices" corev1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" @@ -48,7 +48,7 @@ type NetworkInterfaceReconciler struct { //+kubebuilder:rbac:groups=core.apinet.ironcore.dev,resources=nattables,verbs=get;list;watch //+kubebuilder:rbac:groups=core.apinet.ironcore.dev,resources=natgateways,verbs=get;list;watch -//+cluster=metalnet:kubebuilder:rbac:groups=networking.metalnet.onmetal.de,resources=networkinterfaces,verbs=get;list;watch;create;update;patch;delete;deletecollection +//+cluster=metalnet:kubebuilder:rbac:groups=networking.metalnet.ironcore.dev,resources=networkinterfaces,verbs=get;list;watch;create;update;patch;delete;deletecollection //+cluster=metalnet:kubebuilder:rbac:groups="",resources=nodes,verbs=get;list;watch func (r *NetworkInterfaceReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { diff --git a/metalnetlet/controllers/networkinterface_controller_test.go b/metalnetlet/controllers/networkinterface_controller_test.go index 5622bd82..406db22f 100644 --- a/metalnetlet/controllers/networkinterface_controller_test.go +++ b/metalnetlet/controllers/networkinterface_controller_test.go @@ -9,7 +9,7 @@ import ( "github.com/ironcore-dev/ironcore-net/api/core/v1alpha1" "github.com/ironcore-dev/ironcore-net/apimachinery/api/net" . "github.com/ironcore-dev/ironcore/utils/testing" - metalnetv1alpha1 "github.com/onmetal/metalnet/api/v1alpha1" + metalnetv1alpha1 "github.com/ironcore-dev/metalnet/api/v1alpha1" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" corev1 "k8s.io/api/core/v1"