Skip to content

Commit

Permalink
Move OOB from onmetal to ironcore-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Gchbg committed Feb 26, 2024
1 parent f1cbeb7 commit db44844
Show file tree
Hide file tree
Showing 38 changed files with 246 additions and 1,602 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
id: meta
with:
images: |
ghcr.io/${{ github.repository_owner }}/oob-operator
ghcr.io/${{ github.repository_owner }}/oob
tags: |
type=semver,pattern={{version}}
type=schedule
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@
*.swo
*~

oob-operator
oob
7 changes: 3 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# Build the oob-operator binary
FROM golang:1.22 as builder

ARG TARGETARCH
Expand All @@ -24,7 +23,7 @@ COPY internal/ internal/
COPY servers/ servers/
COPY *.go ./

RUN CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} go build -a -o oob-operator main.go
RUN CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} go build -a -o oob main.go

RUN --mount=type=ssh --mount=type=secret,id=github_pat GITHUB_PAT_PATH=/run/secrets/github_pat go get github.com/onmetal/oob-console && go install github.com/onmetal/oob-console

Expand All @@ -37,7 +36,7 @@ RUN apt-get update && \
rm -rf /var/lib/apt/lists/*

USER 65532:65532
ENTRYPOINT ["/oob-operator"]
ENTRYPOINT ["/oob"]

COPY --from=builder /workspace/oob-operator .
COPY --from=builder /workspace/oob .
COPY --from=builder /go/bin/oob-console .
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ test: manifests generate fmt vet ## Run tests.

.PHONY: build
build: generate fmt vet ## Build manager binary.
@go build -o oob-operator .
@go build -o oob .

.PHONY: install
install: manifests ## Install CRDs into the K8s cluster specified in ~/.kube/config.
Expand Down
10 changes: 5 additions & 5 deletions PROJECT
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
domain: onmetal.de
domain: ironcore.dev
layout:
- go.kubebuilder.io/v3
projectName: oob-operator
repo: github.com/onmetal/oob-operator
projectName: oob
repo: github.com/ironcore-dev/oob
resources:
- api:
crdVersion: v1
namespaced: true
controller: true
domain: onmetal.de
domain: ironcore.dev
kind: OOB
path: github.com/onmetal/oob-operator/api/v1alpha1
path: github.com/ironcore-dev/oob/api/v1alpha1
version: v1alpha1
version: "3"
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# oob-operator
# oob
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
[![GitHub License](https://img.shields.io/static/v1?label=License&message=Apache-2.0&color=blue&style=flat-square)](LICENSE)

## Overview
The operator is doing a "light" lights out management of the hardware deployed in an onmetal installation.
The operator is doing a "light" lights out management of the hardware deployed in an Ironcore installation.
It is handling the user management, power states, identification and service data collection via/of the
baseboard management controllers by leveraging different industry standards and protocols (e.g. Redfish/IPMI).

Expand Down
4 changes: 2 additions & 2 deletions api/v1alpha1/groupversion_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ limitations under the License.

// Package v1alpha1 contains API Schema definitions for the v1alpha1 API group
// +kubebuilder:object:generate=true
// +groupName=onmetal.de
// +groupName=ironcore.dev
package v1alpha1

import (
Expand All @@ -26,7 +26,7 @@ import (

var (
// GroupVersion is group version used to register these objects
GroupVersion = schema.GroupVersion{Group: "onmetal.de", Version: "v1alpha1"}
GroupVersion = schema.GroupVersion{Group: "ironcore.dev", Version: "v1alpha1"}
SchemeGroupVersion = GroupVersion

// SchemeBuilder is used to add go types to the GroupVersionKind scheme
Expand Down
6 changes: 3 additions & 3 deletions applyconfiguration/api/v1alpha1/oob.go

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

14 changes: 7 additions & 7 deletions applyconfiguration/internal/internal.go

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

4 changes: 2 additions & 2 deletions applyconfiguration/utils.go

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

2 changes: 1 addition & 1 deletion bmc/bmc.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"regexp"
"time"

"github.com/onmetal/oob-operator/internal/log"
"github.com/ironcore-dev/oob/internal/log"
)

type BMC interface {
Expand Down
2 changes: 1 addition & 1 deletion bmc/ipmi.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
"golang.org/x/text/cases"
"golang.org/x/text/language"

"github.com/onmetal/oob-operator/internal/log"
"github.com/ironcore-dev/oob/internal/log"
)

func init() {
Expand Down
2 changes: 1 addition & 1 deletion bmc/redfish.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import (
"github.com/stmcginnis/gofish/common"
"github.com/stmcginnis/gofish/redfish"

"github.com/onmetal/oob-operator/internal/log"
"github.com/ironcore-dev/oob/internal/log"
)

func init() {
Expand Down
4 changes: 2 additions & 2 deletions bmc/ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
"github.com/hashicorp/go-multierror"
"golang.org/x/crypto/ssh"

"github.com/onmetal/oob-operator/internal/log"
"github.com/ironcore-dev/oob/internal/log"
)

func init() {
Expand Down Expand Up @@ -79,7 +79,7 @@ var fields = map[string]string{
"SKU": "product_sku",
}

var namespaceForUUID = "onmetal.de"
var namespaceForUUID = "ironcore.dev"

func sshConnect(ctx context.Context, host string, port int, creds Credentials) (*ssh.Client, error) {
log.Debug(ctx, "Connecting via SSH", "host", host, "user", creds.Username)
Expand Down
2 changes: 1 addition & 1 deletion config/console/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ patches:
- target:
group: apps
kind: Deployment
name: oob-operator-controller-manager
name: oob-controller-manager
namespace: system
version: v1
path: args_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
name: oobs.onmetal.de
name: oobs.ironcore.dev
spec:
group: onmetal.de
group: ironcore.dev
names:
kind: OOB
listKind: OOBList
Expand Down
4 changes: 2 additions & 2 deletions config/crd/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
# since it depends on service name and namespace that are out of this kustomize package.
# It should be run by config/default
resources:
- bases/onmetal.de_oobs.yaml
- bases/ironcore.dev_oobs.yaml
#+kubebuilder:scaffold:crdkustomizeresource

patchesStrategicMerge:
patchesStrategicMerge: {}
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix.
# patches here are for enabling the conversion webhook for each CRD
#- patches/webhook_in_oobs.yaml
Expand Down
2 changes: 1 addition & 1 deletion config/crd/patches/cainjection_in_oobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ kind: CustomResourceDefinition
metadata:
annotations:
cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
name: oobs.onmetal.de
name: oobs.ironcore.dev
2 changes: 1 addition & 1 deletion config/crd/patches/webhook_in_oobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: oobs.onmetal.de
name: oobs.ironcore.dev
spec:
conversion:
strategy: Webhook
Expand Down
6 changes: 3 additions & 3 deletions config/default/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Adds namespace to all resources.
namespace: oob-operator-system
namespace: oob-system

# Value of this field is prepended to the
# names of all resources, e.g. a deployment named
# "wordpress" becomes "alices-wordpress".
# Note that it should also match with the prefix (text before '-') of the namespace
# field above.
namePrefix: oob-operator-
namePrefix: oob-

# Labels to add to all resources and selectors.
#commonLabels:
Expand Down Expand Up @@ -44,7 +44,7 @@ patchesStrategicMerge:
#- webhookcainjection_patch.yaml

# the following config is for teaching kustomize how to do var substitution
vars:
vars: {}
# [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER' prefix.
#- name: CERTIFICATE_NAMESPACE # namespace of the certificate CR
# objref:
Expand Down
2 changes: 1 addition & 1 deletion config/manager/controller_manager_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ webhook:
port: 9443
leaderElection:
leaderElect: true
resourceName: 1efc35bc.onmetal.de
resourceName: oob.ironcore.dev
# leaderElectionReleaseOnCancel defines if the leader should step down volume
# when the Manager ends. This requires the binary to immediately end when the
# Manager is stopped, otherwise, this setting is unsafe. Setting this significantly
Expand Down
2 changes: 1 addition & 1 deletion config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ spec:
type: RuntimeDefault
containers:
- command:
- /oob-operator
- /oob
args:
- --leader-elect
image: controller:latest
Expand Down
4 changes: 2 additions & 2 deletions config/rbac/oob_editor_role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
name: oob-editor-role
rules:
- apiGroups:
- onmetal.de
- ironcore.dev
resources:
- oobs
verbs:
Expand All @@ -17,7 +17,7 @@ rules:
- update
- watch
- apiGroups:
- onmetal.de
- ironcore.dev
resources:
- oobs/status
verbs:
Expand Down
4 changes: 2 additions & 2 deletions config/rbac/oob_viewer_role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ metadata:
name: oob-viewer-role
rules:
- apiGroups:
- onmetal.de
- ironcore.dev
resources:
- oobs
verbs:
- get
- list
- watch
- apiGroups:
- onmetal.de
- ironcore.dev
resources:
- oobs/status
verbs:
Expand Down
10 changes: 5 additions & 5 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ metadata:
name: manager-role
rules:
- apiGroups:
- compute.api.onmetal.de
- compute.api.ironcore.dev
resources:
- machinepools
verbs:
- get
- list
- watch
- apiGroups:
- compute.api.onmetal.de
- compute.api.ironcore.dev
resources:
- machines
verbs:
Expand Down Expand Up @@ -47,7 +47,7 @@ rules:
verbs:
- get
- apiGroups:
- onmetal.de
- ironcore.dev
resources:
- oobs
verbs:
Expand All @@ -59,13 +59,13 @@ rules:
- update
- watch
- apiGroups:
- onmetal.de
- ironcore.dev
resources:
- oobs/finalizers
verbs:
- update
- apiGroups:
- onmetal.de
- ironcore.dev
resources:
- oobs/status
verbs:
Expand Down
Loading

0 comments on commit db44844

Please sign in to comment.