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

Move project to ironcore-dev org #155

Merged
merged 1 commit into from
Dec 6, 2023
Merged
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
13 changes: 4 additions & 9 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
name-template: 'v$RESOLVED_VERSION'
tag-template: 'v$RESOLVED_VERSION'
categories:
- title: '⚠️ Breaking'
labels:
- 'breaking'
- title: '🚀 Features'
labels:
- 'feature'
- 'enhancement'
- 'api-change'
- 'compute'
- title: '🐛 Bug Fixes'
labels:
- 'fix'
Expand All @@ -33,12 +34,6 @@ version-resolver:
exclude-labels:
- 'skip-changelog'
autolabeler:
- label: 'api-change'
files:
- '/apis/*'
- label: 'compute'
files:
- '/controllers/compute/*'
- label: 'documentation'
files:
- '*.md'
Expand All @@ -56,4 +51,4 @@ autolabeler:
- '/JIRA-[0-9]{1,4}/'
template: |
## Changes
$CHANGES
$CHANGES
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.54.2
version: v1.55.2
2 changes: 1 addition & 1 deletion .github/workflows/publish-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
id: meta
with:
images: |
ghcr.io/${{ github.repository_owner }}/kubectl-onmetal
ghcr.io/${{ github.repository_owner }}/kubectl-ironcore
tags: |
type=semver,pattern={{version}}
type=schedule
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,17 @@ on:
push:
branches:
- main
pull_request_target:
types: [opened, reopened, synchronize]
pull_request:
types: [ opened, reopened, synchronize ]

jobs:
update_release_draft:
permissions:
# write permission is required to create a github release
contents: write
# write permission is required for autolabeler
# otherwise, read permission is required at least
pull-requests: write
runs-on: ubuntu-latest
steps:
# Drafts your next Release notes as Pull Requests are merged into "main"
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/size-label.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
name: Size Label

on:
pull_request_target:
types: [opened, reopened, synchronize]
pull_request:
types:
- opened
- edited
- synchronize

jobs:
size-label:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: size-label
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ jobs:
go-version-file: 'go.mod'
- run: make test
# Do a build to see whether the binary still compiles.
- run: go build -o bin/kubectl-onmetal .
- run: go build -o bin/kubectl-ironcore .
4 changes: 2 additions & 2 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# onmetal-api maintainers
* @onmetal/onmetal-api-maintainers
# ironcore maintainers
* @ironcore-dev/core
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Build the kubectl-onmetal binary
# Build the kubectl-ironcore binary
FROM golang:1.20 as builder

WORKDIR /workspace
Expand All @@ -25,13 +25,13 @@ ARG TARGETARCH
# Build
RUN mkdir bin

RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -ldflags="-s -w" -a -o bin/kubectl-onmetal main.go
RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -ldflags="-s -w" -a -o bin/kubectl-ironcore main.go

# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
FROM gcr.io/distroless/static:nonroot
WORKDIR /
COPY --from=builder /workspace/bin/kubectl-onmetal .
COPY --from=builder /workspace/bin/kubectl-ironcore .
USER 65532:65532

ENTRYPOINT ["/kubectl-onmetal"]
ENTRYPOINT ["/kubectl-ironcore"]
9 changes: 4 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Image URL to use all building/pushing image targets
IMG ?= kubectl-onmetal:latest
IMG ?= kubectl-ironcore:latest

.PHONY: all
all: check
Expand Down Expand Up @@ -29,11 +29,11 @@ fmt: goimports ## Run goimports against code.

.PHONY: add-license
add-license: addlicense ## Add license headers to all go files.
find . -name '*.go' -exec $(ADDLICENSE) -c 'OnMetal authors' {} +
find . -name '*.go' -exec $(ADDLICENSE) -c 'IronCore authors' {} +

.PHONY: check-license
check-license: addlicense ## Check that every file has a license header present.
find . -name '*.go' -exec $(ADDLICENSE) -check -c 'OnMetal authors' {} +
find . -name '*.go' -exec $(ADDLICENSE) -check -c 'IronCore authors' {} +

.PHONY: generate
generate: ## Generate code (mocks etc.).
Expand All @@ -52,7 +52,7 @@ check: generate add-license fmt lint test ## Execute multiple checks.

.PHONY: build
build: generate fmt ## Build the binary
go build -o bin/kubectl-onmetal .
go build -o bin/kubectl-ironcore .

.PHONY: install
install: generate fmt ## Install the binary to /usr/local/bin
Expand Down Expand Up @@ -90,4 +90,3 @@ $(ADDLICENSE): $(LOCALBIN)
goimports: $(GOIMPORTS) ## Download goimports locally if necessary.
$(GOIMPORTS): $(LOCALBIN)
test -s $(LOCALBIN)/goimports || GOBIN=$(LOCALBIN) go install golang.org/x/tools/cmd/goimports@$(GOIMPORTS_VERSION)

9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# kubectl-onmetal
# kubectl-ironcore

[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://makeapullrequest.com)
[![GitHub License](https://img.shields.io/static/v1?label=License&message=Apache-2.0&color=blue&style=flat-square)](LICENSE)

## Overview

kubectl-onmetal is a kubectl plugin for working with the onmetal types.
kubectl-ironcore is a kubectl plugin for working with the ironcore types.

## Installation, Usage and Development

Expand All @@ -15,8 +15,8 @@ To install the tool, run
make install
```

This makes the tool available under `/usr/bin/local/kubectl-onmetal` and thus (if present in your PATH) via
`kubectl onmetal`.
This makes the tool available under `/usr/bin/local/kubectl-ironcore` and thus (if present in your PATH) via
`kubectl ironcore`.

## Contributing

Expand All @@ -25,4 +25,3 @@ We'd love to get feedback from you. Please report bugs, suggestions or post ques
## License

[Apache-2.0](LICENSE)

6 changes: 3 additions & 3 deletions api/constants.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 OnMetal authors
// Copyright 2023 IronCore authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -17,6 +17,6 @@ package api
import "sigs.k8s.io/controller-runtime/pkg/client"

const (
// FieldOwner is the field owner kubectl-onmetal uses.
FieldOwner = client.FieldOwner("api.onmetal.de/kubectl-onmetal")
// FieldOwner is the field owner kubectl-ironcore uses.
FieldOwner = client.FieldOwner("api.ironcore.dev/kubectl-ironcore")
)
4 changes: 2 additions & 2 deletions bootstrapkubeconfig/bootstrapkubeconfig.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 OnMetal authors
// Copyright 2023 IronCore authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -17,7 +17,7 @@ package bootstrapkubeconfig
import (
"fmt"

"github.com/onmetal/kubectl-onmetal/utils/bootstraptoken"
"github.com/ironcore-dev/kubectl-ironcore/utils/bootstraptoken"
clientcmdapi "k8s.io/client-go/tools/clientcmd/api"
)

Expand Down
16 changes: 8 additions & 8 deletions bootstraptoken/bootstraptoken.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 OnMetal authors
// Copyright 2023 IronCore authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -17,7 +17,7 @@ package bootstraptoken
import (
"fmt"

"github.com/onmetal/kubectl-onmetal/utils/bootstraptoken"
"github.com/ironcore-dev/kubectl-ironcore/utils/bootstraptoken"
"k8s.io/apimachinery/pkg/util/sets"
)

Expand All @@ -33,12 +33,12 @@ const (
)

const (
MachinePoolBootstrappersGroup = "system:bootstrappers:compute-api-onmetal-de:machinepools"
VolumePoolBootstrappersGroup = "system:bootstrappers:storage-api-onmetal-de:volumepools"
BucketPoolBootstrappersGroup = "system:bootstrappers:storage-api-onmetal-de:bucketpools"
NetworkPluginBootstrappersGroup = "system:bootstrappers:networking-api-onmetal-de:networkplugins"
APINetletBootstrappersGroup = "system:bootstrappers:apinet-api-onmetal-de:apinetlets"
MetalnetletBootstrappersGroup = "system:bootstrappers:apinet-api-onmetal-de:metalnetlets"
MachinePoolBootstrappersGroup = "system:bootstrappers:compute-ironcore-dev:machinepools"
VolumePoolBootstrappersGroup = "system:bootstrappers:storage-ironcore-dev:volumepools"
BucketPoolBootstrappersGroup = "system:bootstrappers:storage-ironcore-dev:bucketpools"
NetworkPluginBootstrappersGroup = "system:bootstrappers:networking-ironcore-dev:networkplugins"
APINetletBootstrappersGroup = "system:bootstrappers:apinet-ironcore-dev:apinetlets"
MetalnetletBootstrappersGroup = "system:bootstrappers:apinet-ironcore-dev:metalnetlets"
)

var AvailableTypes = sets.New[Type](
Expand Down
4 changes: 2 additions & 2 deletions cmd/create/create.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 OnMetal authors
// Copyright 2023 IronCore authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -15,7 +15,7 @@
package create

import (
"github.com/onmetal/kubectl-onmetal/cmd/create/token"
"github.com/ironcore-dev/kubectl-ironcore/cmd/create/token"
"github.com/spf13/cobra"
"k8s.io/cli-runtime/pkg/genericclioptions"
cmdutil "k8s.io/kubectl/pkg/cmd/util"
Expand Down
8 changes: 4 additions & 4 deletions cmd/create/token/token.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 OnMetal authors
// Copyright 2023 IronCore authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -19,9 +19,9 @@ import (
"fmt"
"time"

"github.com/onmetal/kubectl-onmetal/api"
"github.com/onmetal/kubectl-onmetal/bootstraptoken"
utilbootstraptoken "github.com/onmetal/kubectl-onmetal/utils/bootstraptoken"
"github.com/ironcore-dev/kubectl-ironcore/api"
"github.com/ironcore-dev/kubectl-ironcore/bootstraptoken"
utilbootstraptoken "github.com/ironcore-dev/kubectl-ironcore/utils/bootstraptoken"
"github.com/spf13/cobra"
"k8s.io/apimachinery/pkg/util/sets"
"k8s.io/cli-runtime/pkg/genericclioptions"
Expand Down
14 changes: 7 additions & 7 deletions cmd/exec/exec.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2021 OnMetal authors
// Copyright 2021 IronCore authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -20,9 +20,9 @@ import (
"net/http"
"os"

computev1alpha1 "github.com/onmetal/onmetal-api/api/compute/v1alpha1"
onmetalapiclientgo "github.com/onmetal/onmetal-api/client-go/onmetalapi"
onmetalapiclientgoscheme "github.com/onmetal/onmetal-api/client-go/onmetalapi/scheme"
computev1alpha1 "github.com/ironcore-dev/ironcore/api/compute/v1alpha1"
ironcoreclientgo "github.com/ironcore-dev/ironcore/client-go/ironcore"
ironcoreclientgoscheme "github.com/ironcore-dev/ironcore/client-go/ironcore/scheme"
"github.com/spf13/cobra"
"k8s.io/cli-runtime/pkg/genericclioptions"
"k8s.io/client-go/tools/remotecommand"
Expand Down Expand Up @@ -59,18 +59,18 @@ func Run(ctx context.Context, restClientGetter genericclioptions.RESTClientGette
return fmt.Errorf("error determining target namespace: %w", err)
}

onmetalClientset, err := onmetalapiclientgo.NewForConfig(cfg)
ironcoreClientset, err := ironcoreclientgo.NewForConfig(cfg)
if err != nil {
return err
}

req := onmetalClientset.ComputeV1alpha1().RESTClient().
req := ironcoreClientset.ComputeV1alpha1().RESTClient().
Post().
Namespace(namespace).
Resource("machines").
Name(name).
SubResource("exec").
VersionedParams(&computev1alpha1.MachineExecOptions{InsecureSkipTLSVerifyBackend: insecureSkipVerifyTLSBackend}, onmetalapiclientgoscheme.ParameterCodec)
VersionedParams(&computev1alpha1.MachineExecOptions{InsecureSkipTLSVerifyBackend: insecureSkipVerifyTLSBackend}, ironcoreclientgoscheme.ParameterCodec)

var sizeQueue remotecommand.TerminalSizeQueue
tty := term.TTY{
Expand Down
6 changes: 3 additions & 3 deletions cmd/generate/bootstrap-kubeconfig/bootstrapkubeconfig.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 OnMetal authors
// Copyright 2023 IronCore authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -20,8 +20,8 @@ import (
"io"
"os"

"github.com/onmetal/kubectl-onmetal/bootstrapkubeconfig"
utilbootstraptoken "github.com/onmetal/kubectl-onmetal/utils/bootstraptoken"
"github.com/ironcore-dev/kubectl-ironcore/bootstrapkubeconfig"
utilbootstraptoken "github.com/ironcore-dev/kubectl-ironcore/utils/bootstraptoken"
"github.com/spf13/cobra"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/util/yaml"
Expand Down
4 changes: 2 additions & 2 deletions cmd/generate/generate.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 OnMetal authors
// Copyright 2023 IronCore authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -15,7 +15,7 @@
package generate

import (
bootstrapkubeconfig "github.com/onmetal/kubectl-onmetal/cmd/generate/bootstrap-kubeconfig"
bootstrapkubeconfig "github.com/ironcore-dev/kubectl-ironcore/cmd/generate/bootstrap-kubeconfig"
"github.com/spf13/cobra"
"k8s.io/cli-runtime/pkg/genericclioptions"
"k8s.io/client-go/tools/clientcmd"
Expand Down
Loading
Loading