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

Rename Boots to Smee #52

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
Tinkerbell operator is a Kubernetes operator that deploys Tinkerbell components in a Kubernetes cluster. The operator takes care of
the deployment and lifecycle of these Tinkerbell services:

- **Boots**: The DHCP and iPXE server for Tinkerbell
- **Smee**: The DHCP and iPXE server for Tinkerbell
- **Hegel**: An instance metadata service for Tinkerbell
- **Rufio**: Rufio is a declarative state manager for BMCs
- **Tink**: A workflow engine for provisioning bare metal
Expand Down Expand Up @@ -35,7 +35,7 @@ this upgrade, such as migrating the existing CRs to the new CRDs.
monitoring the running services and deployments.
- **Observability**: Observing and reflecting on the changes in the Tinkerbell setup ecosystem (e.g., picking up and deploying
new configurations without the need for manual intervention).
- **Building up the Standards**: Identifying and focusing on Tinkerbell’s essential and standard components (e.g., Boots and Hegel)
- **Building up the Standards**: Identifying and focusing on Tinkerbell’s essential and standard components (e.g., Smee and Hegel)
without confusing these components with utilities (e.g., KubeVip and Nginx) to introduce a clearer path of what we support
out of the box as a community and what we do not.

Expand All @@ -53,5 +53,5 @@ all the required resources there.

## Current Stage
The operator only deploys tinkerbell provisioning components, and it doesn't take care of any other utilities and network plumbings
(e.g: it doesn't install network services to expose boots). However, we are considering of adding some of these utilities in
(e.g: it doesn't install network services to expose smee). However, we are considering of adding some of these utilities in
the future as Addons.
26 changes: 13 additions & 13 deletions docs/proposals/tinkerbell-stack-crd.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,17 @@ type TinkerbellSpec struct {
ClusterDNS string `json:"clusterDNS"`

// OverwriteRegistry is the registry to use for all images. If this field is set, all tink service deployment images
// will be prefixed with this value. For example if the value here was set to docker.io, then boots image will be
// docker.io/tinkerbell/boots.
// will be prefixed with this value. For example if the value here was set to docker.io, then smee image will be
// docker.io/tinkerbell/smee.
OverwriteRegistry string `json:"overwriteRegistry"`

// DockerPullConfig the secret name containing the docker auth config which should exist in the same namespace where
// the operator is deployed(typically tinkerbell)
DockerPullComfig string `json:"dockerPullComfig"`

// Boots contains all the information and spec about boots.
Boots BootsSpec `json:"boots"`
// Hegel contains all the information and spec about boots.
// Smee contains all the information and spec about smee.
Smee SmeeSpec `json:"smee"`
// Hegel contains all the information and spec about smee.
Hegel HegelSpec `json:"hegel"`
// Rufio contains all the information and spec about rufio.
Rufio RufioSpec `json:"rufio"`
Expand All @@ -82,18 +82,18 @@ type TinkerbellSpec struct {
```go
// ImageSpec specifies the details of a tinkerbell services images.
type ImageSpec struct {
// ImageRepository is used to set the BootsSpec image repository.
// ImageRepository is used to set the SmeeSpec image repository.
ImageRepository string `json:"imageRepository,omitempty"`

// ImageTag is used to set the BootsSpec image tag.
// ImageTag is used to set the SmeeSpec image tag.
ImageTag string `json:"imageTag,omitempty"`
}
```

#### BootsSpec
#### SmeeSpec
```go
// BootsSpec specifies the details of tinkerbell service boots.
type BootsSpec struct {
// SmeeSpec specifies the details of tinkerbell service smee.
type SmeeSpec struct {
// Image specifies the details of a tinkerbell services images
Image ImageSpec `json:"image"`

Expand All @@ -112,7 +112,7 @@ type BootsSpec struct {
// OSIEPathOverride override the URL where OSIE/Hook images are located
OSIEPathOverride string `json:"osiePathOverride"`

// PublicIP is the IP that netboot clients and/or DHCP relay's will use to reach Boots
// PublicIP is the IP that netboot clients and/or DHCP relay's will use to reach Smee
PublicIP string `json:"publicIP"`

// PublicSyslogFQDN is the IP that syslog clients will use to send messages
Expand All @@ -124,10 +124,10 @@ type BootsSpec struct {
// TinkerbellGRPCAuthority is the IP:Port that a Tink worker will use for communicated with the Tink server
TinkerbellGRPCAuthority string `json:"tinkerbellGRPCAuthority"`

// TinkerbellTLS sets if the boots should run with TLS or not.
// TinkerbellTLS sets if the smee should run with TLS or not.
TinkerbellTLS bool `json:"tinkerbellTLS"`

// LogLevel sets the debug level for boots.
// LogLevel sets the debug level for smee.
logLevel string `json:"logLevel"`
}
```
Expand Down
22 changes: 11 additions & 11 deletions pkg/controller/reconcile.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ import (
"context"
"fmt"

"github.com/tinkerbell/operator/pkg/resources/boots"
"github.com/tinkerbell/operator/pkg/resources/hegel"
"github.com/tinkerbell/operator/pkg/resources/rufio"
"github.com/tinkerbell/operator/pkg/resources/smee"
"github.com/tinkerbell/operator/pkg/resources/tink"
)

func (r *Reconciler) ensureTinkerbellServiceAccounts(ctx context.Context) error {
if err := boots.CreateServiceAccount(ctx, r.Client, r.namespace); err != nil {
return fmt.Errorf("failed to create boots service account: %v", err)
if err := smee.CreateServiceAccount(ctx, r.Client, r.namespace); err != nil {
return fmt.Errorf("failed to create smee service account: %v", err)
}

if err := hegel.CreateServiceAccount(ctx, r.Client, r.namespace); err != nil {
Expand All @@ -35,8 +35,8 @@ func (r *Reconciler) ensureTinkerbellServiceAccounts(ctx context.Context) error
}

func (r *Reconciler) ensureTinkerbellClusterRole(ctx context.Context) error {
if err := boots.CreateClusterRole(ctx, r.Client); err != nil {
return fmt.Errorf("failed to create boots cluster role: %v", err)
if err := smee.CreateClusterRole(ctx, r.Client); err != nil {
return fmt.Errorf("failed to create smee cluster role: %v", err)
}

if err := rufio.CreateClusterRole(ctx, r.Client); err != nil {
Expand All @@ -55,8 +55,8 @@ func (r *Reconciler) ensureTinkerbellClusterRole(ctx context.Context) error {
}

func (r *Reconciler) ensureTinkerbellClusterRoleBinding(ctx context.Context) error {
if err := boots.CreateClusterRoleBinding(ctx, r.Client, r.namespace); err != nil {
return fmt.Errorf("failed to create boots cluster role binding: %v", err)
if err := smee.CreateClusterRoleBinding(ctx, r.Client, r.namespace); err != nil {
return fmt.Errorf("failed to create smee cluster role binding: %v", err)
}

if err := rufio.CreateClusterRoleBinding(ctx, r.Client, r.namespace); err != nil {
Expand Down Expand Up @@ -107,8 +107,8 @@ func (r *Reconciler) ensureTinkerbellRoleBinding(ctx context.Context) error {
}

func (r *Reconciler) ensureTinkerbellServices(ctx context.Context) error {
if err := boots.CreateService(ctx, r.Client, r.namespace); err != nil {
return fmt.Errorf("failed to create boots service: %v", err)
if err := smee.CreateService(ctx, r.Client, r.namespace); err != nil {
return fmt.Errorf("failed to create smee service: %v", err)
}

if err := hegel.CreateService(ctx, r.Client, r.namespace); err != nil {
Expand All @@ -123,8 +123,8 @@ func (r *Reconciler) ensureTinkerbellServices(ctx context.Context) error {
}

func (r *Reconciler) ensureTinkerbellDeployments(ctx context.Context) error {
if err := boots.CreateDeployment(ctx, r.Client, r.namespace); err != nil {
return fmt.Errorf("failed to create boots deployment: %v", err)
if err := smee.CreateDeployment(ctx, r.Client, r.namespace); err != nil {
return fmt.Errorf("failed to create smee deployment: %v", err)
}

if err := hegel.CreateDeployment(ctx, r.Client, r.namespace); err != nil {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package boots
package smee

import (
"context"
Expand All @@ -15,32 +15,32 @@ import (
func CreateDeployment(ctx context.Context, client ctrlruntimeclient.Client, ns string) error {
deployment := &appsv1.Deployment{
ObjectMeta: metav1.ObjectMeta{
Name: "boots",
Name: "smee",
Namespace: ns,
Labels: map[string]string{
"app": "boots",
"app": "smee",
},
},
Spec: appsv1.DeploymentSpec{
Replicas: ptr.Int32(1),
Selector: &metav1.LabelSelector{
MatchLabels: map[string]string{
"app": "boots",
"app": "smee",
"stack": "tinkerbell",
},
},
Template: corev1.PodTemplateSpec{
ObjectMeta: metav1.ObjectMeta{
Labels: map[string]string{
"app": "boots",
"app": "smee",
"stack": "tinkerbell",
},
},
Spec: corev1.PodSpec{
Containers: []corev1.Container{
{
Name: "boots",
Image: "quay.io/tinkerbell/boots:v0.8.0",
Name: "smee",
Image: "quay.io/tinkerbell/smee:v0.8.0",
ImagePullPolicy: corev1.PullIfNotPresent,
Args: []string{"--dhcp-addr", "0.0.0.0:67", "--kube-namespace", ns},
Env: parsedEnvVars(),
Expand Down Expand Up @@ -100,8 +100,8 @@ func parsedEnvVars() []corev1.EnvVar {
Value: "http://10.10.15.153",
},
{
Name: "BOOTS_OSIE_PATH_OVERRIDE",
// TODO: pass the BOOTS_OSIE_PATH_OVERRIDE as a command line
Name: "SMEE_OSIE_PATH_OVERRIDE",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This env doesnt exist in Smee. the equivalent is -osie-url / SMEE_OSIE_URL.

// TODO: pass the SMEE_OSIE_PATH_OVERRIDE as a command line
Value: "10.10.15.153",
},
{
Expand All @@ -128,11 +128,11 @@ func parsedEnvVars() []corev1.EnvVar {
Value: "false",
},
{
Name: "BOOTS_LOG_LEVEL",
Name: "SMEE_LOG_LEVEL",
Value: "debug",
},
{
Name: "BOOTS_EXTRA_KERNEL_ARGS",
Name: "SMEE_EXTRA_KERNEL_ARGS",
Value: "tink_worker_image=quay.io/tinkerbell/tink-worker:v0.8.0",
},
}
Expand Down
6 changes: 3 additions & 3 deletions pkg/resources/boots/rbac.go → pkg/resources/smee/rbac.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package boots
package smee

import (
"context"
Expand All @@ -10,8 +10,8 @@ import (
)

const (
clusterRole = "boots-cluster-role"
clusterRoleBinding = "boots-cluster-role-binding"
clusterRole = "smee-cluster-role"
clusterRoleBinding = "smee-cluster-role-binding"
)

func CreateClusterRole(ctx context.Context, client ctrlruntimeclient.Client) error {
Expand Down
4 changes: 2 additions & 2 deletions pkg/resources/boots/sa.go → pkg/resources/smee/sa.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package boots
package smee

import (
"context"
Expand All @@ -10,7 +10,7 @@ import (
)

const (
serviceAccountName = "boots"
serviceAccountName = "smee"
)

func CreateServiceAccount(ctx context.Context, client ctrlruntimeclient.Client, ns string) error {
Expand Down
16 changes: 8 additions & 8 deletions pkg/resources/boots/service.go → pkg/resources/smee/service.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package boots
package smee

import (
"context"
Expand All @@ -13,38 +13,38 @@ import (
func CreateService(ctx context.Context, client ctrlruntimeclient.Client, ns string) error {
service := &corev1.Service{
ObjectMeta: metav1.ObjectMeta{
Name: "boots",
Name: "smee",
Namespace: ns,
Labels: map[string]string{
"app": "boots",
"app": "smee",
},
},
Spec: corev1.ServiceSpec{
ClusterIP: "None",
Selector: map[string]string{
"app": "boots",
"app": "smee",
},
Ports: []corev1.ServicePort{
{
Name: "boots-dhcp",
Name: "smee-dhcp",
Port: 67,
TargetPort: intstr.FromInt(67),
Protocol: corev1.ProtocolUDP,
},
{
Name: "boots-http",
Name: "smee-http",
Port: 80,
TargetPort: intstr.FromInt(80),
Protocol: corev1.ProtocolTCP,
},
{
Name: "boots-syslog",
Name: "smee-syslog",
Port: 514,
TargetPort: intstr.FromInt(514),
Protocol: corev1.ProtocolUDP,
},
{
Name: "boots-tftp",
Name: "smee-tftp",
Port: 69,
TargetPort: intstr.FromInt(69),
Protocol: corev1.ProtocolUDP,
Expand Down
16 changes: 8 additions & 8 deletions pkg/resources/tink/configmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ http {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
resolver {{ .ClusterDNS }};
set $boots_dns boots.tinkerbell.svc.cluster.local; # needed in Kubernetes for dynamic DNS resolution
set $smee_dns smee.tinkerbell.svc.cluster.local; # needed in Kubernetes for dynamic DNS resolution

proxy_pass http://$boots_dns;
proxy_pass http://$smee_dns;
}
}

Expand Down Expand Up @@ -109,25 +109,25 @@ stream {
server {
listen 67 udp;
resolver {{ .ClusterDNS }}; # needed in Kubernetes for dynamic DNS resolution
set $boots_dns boots.tinkerbell.svc.cluster.local; # needed in Kubernetes for dynamic DNS resolution
proxy_pass $boots_dns:67;
set $smee_dns smee.tinkerbell.svc.cluster.local; # needed in Kubernetes for dynamic DNS resolution
proxy_pass $smee_dns:67;
proxy_bind $remote_addr:$remote_port transparent;
proxy_responses 0;
access_log /dev/stdout logger-json;
}
server {
listen 69 udp;
resolver {{ .ClusterDNS }};
set $boots_dns boots.tinkerbell.svc.cluster.local; # needed in Kubernetes for dynamic DNS resolution
proxy_pass $boots_dns:69;
set $smee_dns smee.tinkerbell.svc.cluster.local; # needed in Kubernetes for dynamic DNS resolution
proxy_pass $smee_dns:69;
proxy_timeout 1s;
access_log /dev/stdout logger-json;
}
server {
listen 514 udp;
resolver {{ .ClusterDNS }};
set $boots_dns boots.tinkerbell.svc.cluster.local; # needed in Kubernetes for dynamic DNS resolution
proxy_pass $boots_dns:514;
set $smee_dns smee.tinkerbell.svc.cluster.local; # needed in Kubernetes for dynamic DNS resolution
proxy_pass $smee_dns:514;
proxy_bind $remote_addr:$remote_port transparent;
proxy_responses 0;
access_log /dev/stdout logger-json;
Expand Down
8 changes: 4 additions & 4 deletions pkg/resources/tink/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,22 +177,22 @@ func CreateNginxDeployment(ctx context.Context, client ctrlruntimeclient.Client,
Ports: []corev1.ContainerPort{
{
ContainerPort: int32(67),
Name: "boots-dhcp",
Name: "smee-dhcp",
Protocol: corev1.ProtocolUDP,
},
{
ContainerPort: int32(80),
Name: "boots-http",
Name: "smee-http",
Protocol: corev1.ProtocolTCP,
},
{
ContainerPort: int32(69),
Name: "boots-tftp",
Name: "smee-tftp",
Protocol: corev1.ProtocolUDP,
},
{
ContainerPort: int32(514),
Name: "boots-syslog",
Name: "smee-syslog",
Protocol: corev1.ProtocolUDP,
},
{
Expand Down