Skip to content

Commit

Permalink
Enable dhcrelay for baremetal provider (#8568)
Browse files Browse the repository at this point in the history
* Enable dhcp relay for baremetal provider

* Add dhcp relay images to bundle
  • Loading branch information
ahreehong authored Aug 6, 2024
1 parent 6fe21e0 commit 686be7c
Show file tree
Hide file tree
Showing 27 changed files with 397 additions and 56 deletions.
64 changes: 64 additions & 0 deletions config/crd/bases/anywhere.eks.amazonaws.com_bundles.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2789,6 +2789,68 @@ spec:
tag
type: string
type: object
tinkRelay:
properties:
arch:
description: Architectures of the asset
items:
type: string
type: array
description:
type: string
imageDigest:
description: The SHA256 digest of the image
manifest
type: string
name:
description: The asset name
type: string
os:
description: Operating system of the asset
enum:
- linux
- darwin
- windows
type: string
osName:
description: Name of the OS like ubuntu, bottlerocket
type: string
uri:
description: The image repository, name, and
tag
type: string
type: object
tinkRelayInit:
properties:
arch:
description: Architectures of the asset
items:
type: string
type: array
description:
type: string
imageDigest:
description: The SHA256 digest of the image
manifest
type: string
name:
description: The asset name
type: string
os:
description: Operating system of the asset
enum:
- linux
- darwin
- windows
type: string
osName:
description: Name of the OS like ubuntu, bottlerocket
type: string
uri:
description: The image repository, name, and
tag
type: string
type: object
tinkServer:
properties:
arch:
Expand Down Expand Up @@ -2854,6 +2916,8 @@ spec:
required:
- nginx
- tinkController
- tinkRelay
- tinkRelayInit
- tinkServer
- tinkWorker
type: object
Expand Down
64 changes: 64 additions & 0 deletions config/manifest/eksa-components.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2957,6 +2957,68 @@ spec:
tag
type: string
type: object
tinkRelay:
properties:
arch:
description: Architectures of the asset
items:
type: string
type: array
description:
type: string
imageDigest:
description: The SHA256 digest of the image
manifest
type: string
name:
description: The asset name
type: string
os:
description: Operating system of the asset
enum:
- linux
- darwin
- windows
type: string
osName:
description: Name of the OS like ubuntu, bottlerocket
type: string
uri:
description: The image repository, name, and
tag
type: string
type: object
tinkRelayInit:
properties:
arch:
description: Architectures of the asset
items:
type: string
type: array
description:
type: string
imageDigest:
description: The SHA256 digest of the image
manifest
type: string
name:
description: The asset name
type: string
os:
description: Operating system of the asset
enum:
- linux
- darwin
- windows
type: string
osName:
description: Name of the OS like ubuntu, bottlerocket
type: string
uri:
description: The image repository, name, and
tag
type: string
type: object
tinkServer:
properties:
arch:
Expand Down Expand Up @@ -3022,6 +3084,8 @@ spec:
required:
- nginx
- tinkController
- tinkRelay
- tinkRelayInit
- tinkServer
- tinkWorker
type: object
Expand Down
1 change: 1 addition & 0 deletions pkg/providers/tinkerbell/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ func (p *Provider) PostWorkloadInit(ctx context.Context, cluster *types.Cluster,
stack.WithBootsOnKubernetes(),
stack.WithHostNetworkEnabled(false), // disable host network on workload cluster
stack.WithStackServiceEnabled(true), // use stack service on workload cluster
stack.WithDHCPRelayEnabled(true),
stack.WithLoadBalancerEnabled(
len(clusterSpec.Cluster.Spec.WorkerNodeGroupConfigurations) != 0 && // load balancer is handled by kube-vip in control plane nodes
!p.datacenterConfig.Spec.SkipLoadBalancerDeployment), // configure load balancer based on datacenterConfig.Spec.SkipLoadBalancerDeployment
Expand Down
5 changes: 3 additions & 2 deletions pkg/providers/tinkerbell/stack/stack.go
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,6 @@ func (s *Installer) createValuesOverride(bundle releasev1alpha1.TinkerbellBundle
},
"additionalKernelArgs": bootEnv,
},
"hostNetwork": true,
"tinkWorkerImage": s.localRegistryURL(bundle.TinkerbellStack.Tink.TinkWorker.URI),
},
rufio: map[string]interface{}{
Expand Down Expand Up @@ -584,7 +583,9 @@ func (s *Installer) createValuesOverride(bundle releasev1alpha1.TinkerbellBundle
enabled: s.stackService,
},
relay: map[string]interface{}{
enabled: false,
enabled: s.dhcpRelay,
image: bundle.TinkerbellStack.Tink.TinkRelay,
"initImage": bundle.TinkerbellStack.Tink.TinkRelayInit,
},
"loadBalancerIP": tinkerbellIP,
"hostNetwork": s.hostNetwork,
Expand Down
2 changes: 2 additions & 0 deletions pkg/providers/tinkerbell/stack/stack_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ func getTinkBundle() releasev1alpha1.TinkerbellBundle {
TinkController: releasev1alpha1.Image{URI: "public.ecr.aws/eks-anywhere/tink-controller:latest"},
TinkServer: releasev1alpha1.Image{URI: "public.ecr.aws/eks-anywhere/tink-server:latest"},
TinkWorker: releasev1alpha1.Image{URI: "public.ecr.aws/eks-anywhere/tink-worker:latest"},
TinkRelay: releasev1alpha1.Image{URI: "public.ecr.aws/eks-anywhere/tink-relay:latest"},
TinkRelayInit: releasev1alpha1.Image{URI: "public.ecr.aws/eks-anywhere/tink-relay-init:latest"},
},
Boots: releasev1alpha1.Image{URI: "public.ecr.aws/eks-anywhere/boots:latest"},
Hegel: releasev1alpha1.Image{URI: "public.ecr.aws/eks-anywhere/hegel:latest"},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ rufio:
image: public.ecr.aws/eks-anywhere/rufio:latest
smee:
deploy: true
hostNetwork: true
http:
additionalKernelArgs: []
osieUrl:
Expand Down Expand Up @@ -40,6 +39,10 @@ stack:
loadBalancerIP: 1.2.3.4
relay:
enabled: false
image:
uri: public.ecr.aws/eks-anywhere/tink-relay:latest
initImage:
uri: public.ecr.aws/eks-anywhere/tink-relay-init:latest
service:
enabled: false
tink:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ rufio:
image: public.ecr.aws/eks-anywhere/rufio:latest
smee:
deploy: true
hostNetwork: true
http:
additionalKernelArgs:
- HTTP_PROXY=1.2.3.4
Expand Down Expand Up @@ -37,12 +36,16 @@ stack:
- name: prometheus_server
value: :2213
- name: lb_class_only
value: "true"
value: "true"
enabled: false
image: public.ecr.aws/eks-anywhere/kube-vip:latest
loadBalancerIP: 1.2.3.4
relay:
enabled: false
image:
uri: public.ecr.aws/eks-anywhere/tink-relay:latest
initImage:
uri: public.ecr.aws/eks-anywhere/tink-relay-init:latest
service:
enabled: false
tink:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ rufio:
image: public.ecr.aws/eks-anywhere/rufio:latest
smee:
deploy: false
hostNetwork: true
http:
additionalKernelArgs:
- tink_worker_image=public.ecr.aws/eks-anywhere/tink-worker:latest
Expand Down Expand Up @@ -41,6 +40,10 @@ stack:
loadBalancerIP: 1.2.3.4
relay:
enabled: false
image:
uri: public.ecr.aws/eks-anywhere/tink-relay:latest
initImage:
uri: public.ecr.aws/eks-anywhere/tink-relay-init:latest
service:
enabled: false
tink:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ rufio:
image: public.ecr.aws/eks-anywhere/rufio:latest
smee:
deploy: true
hostNetwork: true
http:
additionalKernelArgs: []
osieUrl:
Expand Down Expand Up @@ -40,6 +39,10 @@ stack:
loadBalancerIP: 1.2.3.4
relay:
enabled: false
image:
uri: public.ecr.aws/eks-anywhere/tink-relay:latest
initImage:
uri: public.ecr.aws/eks-anywhere/tink-relay-init:latest
service:
enabled: false
tink:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ rufio:
image: public.ecr.aws/eks-anywhere/rufio:latest
smee:
deploy: false
hostNetwork: true
http:
additionalKernelArgs:
- tink_worker_image=public.ecr.aws/eks-anywhere/tink-worker:latest
Expand Down Expand Up @@ -41,6 +40,10 @@ stack:
loadBalancerIP: 1.2.3.4
relay:
enabled: false
image:
uri: public.ecr.aws/eks-anywhere/tink-relay:latest
initImage:
uri: public.ecr.aws/eks-anywhere/tink-relay-init:latest
service:
enabled: false
tink:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ rufio:
image: public.ecr.aws/eks-anywhere/rufio:latest
smee:
deploy: true
hostNetwork: true
http:
additionalKernelArgs: []
osieUrl:
Expand Down Expand Up @@ -40,6 +39,10 @@ stack:
loadBalancerIP: 1.2.3.4
relay:
enabled: false
image:
uri: public.ecr.aws/eks-anywhere/tink-relay:latest
initImage:
uri: public.ecr.aws/eks-anywhere/tink-relay-init:latest
service:
enabled: false
tink:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ rufio:
image: public.ecr.aws/eks-anywhere/rufio:latest
smee:
deploy: true
hostNetwork: true
http:
additionalKernelArgs: []
osieUrl:
Expand Down Expand Up @@ -40,6 +39,10 @@ stack:
loadBalancerIP: 1.2.3.4
relay:
enabled: false
image:
uri: public.ecr.aws/eks-anywhere/tink-relay:latest
initImage:
uri: public.ecr.aws/eks-anywhere/tink-relay-init:latest
service:
enabled: false
tink:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ rufio:
image: public.ecr.aws/eks-anywhere/rufio:latest
smee:
deploy: true
hostNetwork: true
http:
additionalKernelArgs: []
osieUrl:
Expand Down Expand Up @@ -40,6 +39,10 @@ stack:
loadBalancerIP: 1.2.3.4
relay:
enabled: false
image:
uri: public.ecr.aws/eks-anywhere/tink-relay:latest
initImage:
uri: public.ecr.aws/eks-anywhere/tink-relay-init:latest
service:
enabled: false
tink:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ rufio:
image: public.ecr.aws/eks-anywhere/rufio:latest
smee:
deploy: true
hostNetwork: true
http:
additionalKernelArgs: []
osieUrl:
Expand Down Expand Up @@ -40,6 +39,10 @@ stack:
loadBalancerIP: 1.2.3.4
relay:
enabled: false
image:
uri: public.ecr.aws/eks-anywhere/tink-relay:latest
initImage:
uri: public.ecr.aws/eks-anywhere/tink-relay-init:latest
service:
enabled: false
tink:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ rufio:
image: public.ecr.aws/eks-anywhere/rufio:latest
smee:
deploy: true
hostNetwork: true
http:
additionalKernelArgs: []
osieUrl:
Expand Down Expand Up @@ -40,6 +39,10 @@ stack:
loadBalancerIP: 1.2.3.4
relay:
enabled: false
image:
uri: public.ecr.aws/eks-anywhere/tink-relay:latest
initImage:
uri: public.ecr.aws/eks-anywhere/tink-relay-init:latest
service:
enabled: false
tink:
Expand Down
Loading

0 comments on commit 686be7c

Please sign in to comment.