mirror of
https://github.com/kairos-io/osbuilder.git
synced 2025-08-01 23:49:33 +00:00
parent
7e4846785d
commit
93769cf295
2
.github/workflows/image.yml
vendored
2
.github/workflows/image.yml
vendored
@ -18,7 +18,7 @@ jobs:
|
|||||||
- name: Prepare
|
- name: Prepare
|
||||||
id: prep
|
id: prep
|
||||||
run: |
|
run: |
|
||||||
DOCKER_IMAGE=quay.io/c3os/osbuilder
|
DOCKER_IMAGE=quay.io/kairos/osbuilder
|
||||||
VERSION=latest
|
VERSION=latest
|
||||||
SHORTREF=${GITHUB_SHA::8}
|
SHORTREF=${GITHUB_SHA::8}
|
||||||
# If this is git tag, use the tag name as a docker tag
|
# If this is git tag, use the tag name as a docker tag
|
||||||
|
2
.github/workflows/tool-image.yml
vendored
2
.github/workflows/tool-image.yml
vendored
@ -18,7 +18,7 @@ jobs:
|
|||||||
- name: Prepare
|
- name: Prepare
|
||||||
id: prep
|
id: prep
|
||||||
run: |
|
run: |
|
||||||
DOCKER_IMAGE=quay.io/c3os/osbuilder-tools
|
DOCKER_IMAGE=quay.io/kairos/osbuilder-tools
|
||||||
VERSION=latest
|
VERSION=latest
|
||||||
SHORTREF=${GITHUB_SHA::8}
|
SHORTREF=${GITHUB_SHA::8}
|
||||||
# If this is git tag, use the tag name as a docker tag
|
# If this is git tag, use the tag name as a docker tag
|
||||||
|
8
Makefile
8
Makefile
@ -4,8 +4,8 @@
|
|||||||
# - use the VERSION as arg of the bundle target (e.g make bundle VERSION=0.0.2)
|
# - use the VERSION as arg of the bundle target (e.g make bundle VERSION=0.0.2)
|
||||||
# - use environment variables to overwrite this value (e.g export VERSION=0.0.2)
|
# - use environment variables to overwrite this value (e.g export VERSION=0.0.2)
|
||||||
VERSION ?= 0.0.1
|
VERSION ?= 0.0.1
|
||||||
IMG ?= quay.io/c3os/osbuilder:test
|
IMG ?= quay.io/kairos/osbuilder:test
|
||||||
CLUSTER_NAME?="c3os-osbuilder-e2e"
|
CLUSTER_NAME?="kairos-osbuilder-e2e"
|
||||||
export ROOT_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
|
export ROOT_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
|
||||||
|
|
||||||
# CHANNELS define the bundle channels used in the bundle.
|
# CHANNELS define the bundle channels used in the bundle.
|
||||||
@ -31,8 +31,8 @@ BUNDLE_METADATA_OPTS ?= $(BUNDLE_CHANNELS) $(BUNDLE_DEFAULT_CHANNEL)
|
|||||||
# This variable is used to construct full image tags for bundle and catalog images.
|
# This variable is used to construct full image tags for bundle and catalog images.
|
||||||
#
|
#
|
||||||
# For example, running 'make bundle-build bundle-push catalog-build catalog-push' will build and push both
|
# For example, running 'make bundle-build bundle-push catalog-build catalog-push' will build and push both
|
||||||
# c3os-x.io/osbuilder-operator-bundle:$VERSION and c3os-x.io/osbuilder-operator-catalog:$VERSION.
|
# kairos.io/osbuilder-bundle:$VERSION and kairos.io/osbuilder-catalog:$VERSION.
|
||||||
IMAGE_TAG_BASE ?= c3os-x.io/osbuilder-operator
|
IMAGE_TAG_BASE ?= kairos.io/osbuilder
|
||||||
|
|
||||||
# BUNDLE_IMG defines the image:tag used for the bundle.
|
# BUNDLE_IMG defines the image:tag used for the bundle.
|
||||||
# You can use it as an arg. (E.g make bundle-build BUNDLE_IMG=<some-registry>/<project-name-bundle>:<tag>)
|
# You can use it as an arg. (E.g make bundle-build BUNDLE_IMG=<some-registry>/<project-name-bundle>:<tag>)
|
||||||
|
8
PROJECT
8
PROJECT
@ -1,19 +1,19 @@
|
|||||||
domain: c3os-x.io
|
domain: kairos.io
|
||||||
layout:
|
layout:
|
||||||
- go.kubebuilder.io/v3
|
- go.kubebuilder.io/v3
|
||||||
plugins:
|
plugins:
|
||||||
manifests.sdk.operatorframework.io/v2: {}
|
manifests.sdk.operatorframework.io/v2: {}
|
||||||
scorecard.sdk.operatorframework.io/v2: {}
|
scorecard.sdk.operatorframework.io/v2: {}
|
||||||
projectName: osartifactbuilder-operator
|
projectName: osartifactbuilder-operator
|
||||||
repo: github.com/c3os-io/osbuilder-operator
|
repo: github.com/kairos-io/osbuilder
|
||||||
resources:
|
resources:
|
||||||
- api:
|
- api:
|
||||||
crdVersion: v1
|
crdVersion: v1
|
||||||
namespaced: true
|
namespaced: true
|
||||||
controller: true
|
controller: true
|
||||||
domain: c3os-x.io
|
domain: kairos.io
|
||||||
group: build
|
group: build
|
||||||
kind: OSArtifact
|
kind: OSArtifact
|
||||||
path: github.com/c3os-io/osbuilder-operator/api/v1alpha1
|
path: github.com/kairos-io/osbuilder/api/v1alpha1
|
||||||
version: v1alpha1
|
version: v1alpha1
|
||||||
version: "3"
|
version: "3"
|
||||||
|
@ -15,8 +15,8 @@ limitations under the License.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Package v1alpha1 contains API Schema definitions for the build v1alpha1 API group
|
// Package v1alpha1 contains API Schema definitions for the build v1alpha1 API group
|
||||||
//+kubebuilder:object:generate=true
|
// +kubebuilder:object:generate=true
|
||||||
//+groupName=build.c3os-x.io
|
// +groupName=build.kairos.io
|
||||||
package v1alpha1
|
package v1alpha1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
@ -26,7 +26,7 @@ import (
|
|||||||
|
|
||||||
var (
|
var (
|
||||||
// GroupVersion is group version used to register these objects
|
// GroupVersion is group version used to register these objects
|
||||||
GroupVersion = schema.GroupVersion{Group: "build.c3os-x.io", Version: "v1alpha1"}
|
GroupVersion = schema.GroupVersion{Group: "build.kairos.io", Version: "v1alpha1"}
|
||||||
|
|
||||||
// SchemeBuilder is used to add go types to the GroupVersionKind scheme
|
// SchemeBuilder is used to add go types to the GroupVersionKind scheme
|
||||||
SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}
|
SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}
|
||||||
|
@ -5,9 +5,9 @@ metadata:
|
|||||||
annotations:
|
annotations:
|
||||||
controller-gen.kubebuilder.io/version: v0.9.0
|
controller-gen.kubebuilder.io/version: v0.9.0
|
||||||
creationTimestamp: null
|
creationTimestamp: null
|
||||||
name: osartifacts.build.c3os-x.io
|
name: osartifacts.build.kairos.io
|
||||||
spec:
|
spec:
|
||||||
group: build.c3os-x.io
|
group: build.kairos.io
|
||||||
names:
|
names:
|
||||||
kind: OSArtifact
|
kind: OSArtifact
|
||||||
listKind: OSArtifactList
|
listKind: OSArtifactList
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
# since it depends on service name and namespace that are out of this kustomize package.
|
# since it depends on service name and namespace that are out of this kustomize package.
|
||||||
# It should be run by config/default
|
# It should be run by config/default
|
||||||
resources:
|
resources:
|
||||||
- bases/build.c3os-x.io_osartifacts.yaml
|
- bases/build.kairos.io_osartifacts.yaml
|
||||||
#+kubebuilder:scaffold:crdkustomizeresource
|
#+kubebuilder:scaffold:crdkustomizeresource
|
||||||
|
|
||||||
patchesStrategicMerge:
|
patchesStrategicMerge:
|
||||||
|
@ -4,4 +4,4 @@ kind: CustomResourceDefinition
|
|||||||
metadata:
|
metadata:
|
||||||
annotations:
|
annotations:
|
||||||
cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
|
cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
|
||||||
name: osartifacts.build.c3os-x.io
|
name: osartifacts.build.kairos.io
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
apiVersion: apiextensions.k8s.io/v1
|
apiVersion: apiextensions.k8s.io/v1
|
||||||
kind: CustomResourceDefinition
|
kind: CustomResourceDefinition
|
||||||
metadata:
|
metadata:
|
||||||
name: osartifacts.build.c3os-x.io
|
name: osartifacts.build.kairos.io
|
||||||
spec:
|
spec:
|
||||||
conversion:
|
conversion:
|
||||||
strategy: Webhook
|
strategy: Webhook
|
||||||
|
@ -8,7 +8,7 @@ webhook:
|
|||||||
port: 9443
|
port: 9443
|
||||||
leaderElection:
|
leaderElection:
|
||||||
leaderElect: true
|
leaderElect: true
|
||||||
resourceName: 98ca89ca.c3os-x.io
|
resourceName: 98ca89ca.kairos.io
|
||||||
# leaderElectionReleaseOnCancel defines if the leader should step down volume
|
# leaderElectionReleaseOnCancel defines if the leader should step down volume
|
||||||
# when the Manager ends. This requires the binary to immediately end when the
|
# when the Manager ends. This requires the binary to immediately end when the
|
||||||
# Manager is stopped, otherwise, this setting is unsafe. Setting this significantly
|
# Manager is stopped, otherwise, this setting is unsafe. Setting this significantly
|
||||||
|
@ -12,5 +12,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1
|
|||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
images:
|
images:
|
||||||
- name: controller
|
- name: controller
|
||||||
newName: quay.io/c3os/osbuilder
|
newName: quay.io/kairos/osbuilder
|
||||||
newTag: test
|
newTag: test
|
||||||
|
@ -5,7 +5,7 @@ metadata:
|
|||||||
name: osartifact-editor-role
|
name: osartifact-editor-role
|
||||||
rules:
|
rules:
|
||||||
- apiGroups:
|
- apiGroups:
|
||||||
- build.c3os-x.io
|
- build.kairos.io
|
||||||
resources:
|
resources:
|
||||||
- osartifacts
|
- osartifacts
|
||||||
verbs:
|
verbs:
|
||||||
@ -17,7 +17,7 @@ rules:
|
|||||||
- update
|
- update
|
||||||
- watch
|
- watch
|
||||||
- apiGroups:
|
- apiGroups:
|
||||||
- build.c3os-x.io
|
- build.kairos.io
|
||||||
resources:
|
resources:
|
||||||
- osartifacts/status
|
- osartifacts/status
|
||||||
verbs:
|
verbs:
|
||||||
|
@ -5,7 +5,7 @@ metadata:
|
|||||||
name: osartifact-viewer-role
|
name: osartifact-viewer-role
|
||||||
rules:
|
rules:
|
||||||
- apiGroups:
|
- apiGroups:
|
||||||
- build.c3os-x.io
|
- build.kairos.io
|
||||||
resources:
|
resources:
|
||||||
- osartifacts
|
- osartifacts
|
||||||
verbs:
|
verbs:
|
||||||
@ -13,7 +13,7 @@ rules:
|
|||||||
- list
|
- list
|
||||||
- watch
|
- watch
|
||||||
- apiGroups:
|
- apiGroups:
|
||||||
- build.c3os-x.io
|
- build.kairos.io
|
||||||
resources:
|
resources:
|
||||||
- osartifacts/status
|
- osartifacts/status
|
||||||
verbs:
|
verbs:
|
||||||
|
@ -6,7 +6,7 @@ metadata:
|
|||||||
name: manager-role
|
name: manager-role
|
||||||
rules:
|
rules:
|
||||||
- apiGroups:
|
- apiGroups:
|
||||||
- build.c3os-x.io
|
- build.kairos.io
|
||||||
resources:
|
resources:
|
||||||
- osartifacts
|
- osartifacts
|
||||||
verbs:
|
verbs:
|
||||||
@ -18,13 +18,13 @@ rules:
|
|||||||
- update
|
- update
|
||||||
- watch
|
- watch
|
||||||
- apiGroups:
|
- apiGroups:
|
||||||
- build.c3os-x.io
|
- build.kairos.io
|
||||||
resources:
|
resources:
|
||||||
- osartifacts/finalizers
|
- osartifacts/finalizers
|
||||||
verbs:
|
verbs:
|
||||||
- update
|
- update
|
||||||
- apiGroups:
|
- apiGroups:
|
||||||
- build.c3os-x.io
|
- build.kairos.io
|
||||||
resources:
|
resources:
|
||||||
- osartifacts/status
|
- osartifacts/status
|
||||||
verbs:
|
verbs:
|
||||||
|
@ -6,7 +6,7 @@ metadata:
|
|||||||
name: manager-role
|
name: manager-role
|
||||||
rules:
|
rules:
|
||||||
- apiGroups:
|
- apiGroups:
|
||||||
- build.c3os-x.io
|
- build.kairos.io
|
||||||
resources:
|
resources:
|
||||||
- osartifacts
|
- osartifacts
|
||||||
verbs:
|
verbs:
|
||||||
@ -18,13 +18,13 @@ rules:
|
|||||||
- update
|
- update
|
||||||
- watch
|
- watch
|
||||||
- apiGroups:
|
- apiGroups:
|
||||||
- build.c3os-x.io
|
- build.kairos.io
|
||||||
resources:
|
resources:
|
||||||
- osartifacts/finalizers
|
- osartifacts/finalizers
|
||||||
verbs:
|
verbs:
|
||||||
- update
|
- update
|
||||||
- apiGroups:
|
- apiGroups:
|
||||||
- build.c3os-x.io
|
- build.kairos.io
|
||||||
resources:
|
resources:
|
||||||
- osartifacts/status
|
- osartifacts/status
|
||||||
verbs:
|
verbs:
|
||||||
@ -32,7 +32,7 @@ rules:
|
|||||||
- patch
|
- patch
|
||||||
- update
|
- update
|
||||||
- apiGroups:
|
- apiGroups:
|
||||||
- build.c3os-x.io
|
- build.kairos.io
|
||||||
resources:
|
resources:
|
||||||
- osartifacts/finalizers
|
- osartifacts/finalizers
|
||||||
verbs:
|
verbs:
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
apiVersion: build.c3os-x.io/v1alpha1
|
apiVersion: build.kairos.io/v1alpha1
|
||||||
kind: OSArtifact
|
kind: OSArtifact
|
||||||
metadata:
|
metadata:
|
||||||
name: osartifact-sample
|
name: osartifact-sample
|
||||||
|
@ -17,7 +17,7 @@ limitations under the License.
|
|||||||
package controllers
|
package controllers
|
||||||
|
|
||||||
import (
|
import (
|
||||||
buildv1alpha1 "github.com/c3os-io/osbuilder-operator/api/v1alpha1"
|
buildv1alpha1 "github.com/kairos-io/osbuilder/api/v1alpha1"
|
||||||
v1 "k8s.io/api/core/v1"
|
v1 "k8s.io/api/core/v1"
|
||||||
|
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
@ -19,7 +19,7 @@ package controllers
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
buildv1alpha1 "github.com/c3os-io/osbuilder-operator/api/v1alpha1"
|
buildv1alpha1 "github.com/kairos-io/osbuilder/api/v1alpha1"
|
||||||
appsv1 "k8s.io/api/apps/v1"
|
appsv1 "k8s.io/api/apps/v1"
|
||||||
v1 "k8s.io/api/core/v1"
|
v1 "k8s.io/api/core/v1"
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
buildv1alpha1 "github.com/c3os-io/osbuilder-operator/api/v1alpha1"
|
buildv1alpha1 "github.com/kairos-io/osbuilder/api/v1alpha1"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
apierrors "k8s.io/apimachinery/pkg/api/errors"
|
apierrors "k8s.io/apimachinery/pkg/api/errors"
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
@ -53,9 +53,9 @@ func genOwner(artifact buildv1alpha1.OSArtifact) []metav1.OwnerReference {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//+kubebuilder:rbac:groups=build.c3os-x.io,resources=osartifacts,verbs=get;list;watch;create;update;patch;delete
|
//+kubebuilder:rbac:groups=build.kairos.io,resources=osartifacts,verbs=get;list;watch;create;update;patch;delete
|
||||||
//+kubebuilder:rbac:groups=build.c3os-x.io,resources=osartifacts/status,verbs=get;update;patch
|
//+kubebuilder:rbac:groups=build.kairos.io,resources=osartifacts/status,verbs=get;update;patch
|
||||||
//+kubebuilder:rbac:groups=build.c3os-x.io,resources=osartifacts/finalizers,verbs=update
|
//+kubebuilder:rbac:groups=build.kairos.io,resources=osartifacts/finalizers,verbs=update
|
||||||
|
|
||||||
// Reconcile is part of the main kubernetes reconciliation loop which aims to
|
// Reconcile is part of the main kubernetes reconciliation loop which aims to
|
||||||
// move the current state of the cluster closer to the desired state.
|
// move the current state of the cluster closer to the desired state.
|
||||||
|
@ -17,7 +17,7 @@ limitations under the License.
|
|||||||
package controllers
|
package controllers
|
||||||
|
|
||||||
import (
|
import (
|
||||||
buildv1alpha1 "github.com/c3os-io/osbuilder-operator/api/v1alpha1"
|
buildv1alpha1 "github.com/kairos-io/osbuilder/api/v1alpha1"
|
||||||
v1 "k8s.io/api/core/v1"
|
v1 "k8s.io/api/core/v1"
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
)
|
)
|
||||||
|
@ -30,7 +30,7 @@ import (
|
|||||||
logf "sigs.k8s.io/controller-runtime/pkg/log"
|
logf "sigs.k8s.io/controller-runtime/pkg/log"
|
||||||
"sigs.k8s.io/controller-runtime/pkg/log/zap"
|
"sigs.k8s.io/controller-runtime/pkg/log/zap"
|
||||||
|
|
||||||
buildv1alpha1 "github.com/c3os-io/osbuilder-operator/api/v1alpha1"
|
buildv1alpha1 "github.com/kairos-io/osbuilder/api/v1alpha1"
|
||||||
//+kubebuilder:scaffold:imports
|
//+kubebuilder:scaffold:imports
|
||||||
)
|
)
|
||||||
|
|
||||||
|
2
go.mod
2
go.mod
@ -1,4 +1,4 @@
|
|||||||
module github.com/c3os-io/osbuilder-operator
|
module github.com/kairos-io/osbuilder
|
||||||
|
|
||||||
go 1.18
|
go 1.18
|
||||||
|
|
||||||
|
8
main.go
8
main.go
@ -31,8 +31,8 @@ import (
|
|||||||
"sigs.k8s.io/controller-runtime/pkg/healthz"
|
"sigs.k8s.io/controller-runtime/pkg/healthz"
|
||||||
"sigs.k8s.io/controller-runtime/pkg/log/zap"
|
"sigs.k8s.io/controller-runtime/pkg/log/zap"
|
||||||
|
|
||||||
buildv1alpha1 "github.com/c3os-io/osbuilder-operator/api/v1alpha1"
|
buildv1alpha1 "github.com/kairos-io/osbuilder/api/v1alpha1"
|
||||||
"github.com/c3os-io/osbuilder-operator/controllers"
|
"github.com/kairos-io/osbuilder/controllers"
|
||||||
//+kubebuilder:scaffold:imports
|
//+kubebuilder:scaffold:imports
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -56,7 +56,7 @@ func main() {
|
|||||||
flag.StringVar(&metricsAddr, "metrics-bind-address", ":8080", "The address the metric endpoint binds to.")
|
flag.StringVar(&metricsAddr, "metrics-bind-address", ":8080", "The address the metric endpoint binds to.")
|
||||||
flag.StringVar(&serveImage, "serve-image", "nginx", "Serve image.")
|
flag.StringVar(&serveImage, "serve-image", "nginx", "Serve image.")
|
||||||
// It needs luet inside
|
// It needs luet inside
|
||||||
flag.StringVar(&toolImage, "tool-image", "quay.io/c3os/osbuilder-tools:latest", "Tool image.")
|
flag.StringVar(&toolImage, "tool-image", "quay.io/kairos/osbuilder-tools:latest", "Tool image.")
|
||||||
|
|
||||||
flag.StringVar(&probeAddr, "health-probe-bind-address", ":8081", "The address the probe endpoint binds to.")
|
flag.StringVar(&probeAddr, "health-probe-bind-address", ":8081", "The address the probe endpoint binds to.")
|
||||||
flag.BoolVar(&enableLeaderElection, "leader-elect", false,
|
flag.BoolVar(&enableLeaderElection, "leader-elect", false,
|
||||||
@ -76,7 +76,7 @@ func main() {
|
|||||||
Port: 9443,
|
Port: 9443,
|
||||||
HealthProbeBindAddress: probeAddr,
|
HealthProbeBindAddress: probeAddr,
|
||||||
LeaderElection: enableLeaderElection,
|
LeaderElection: enableLeaderElection,
|
||||||
LeaderElectionID: "98ca89ca.c3os-x.io",
|
LeaderElectionID: "98ca89ca.kairos.io",
|
||||||
// LeaderElectionReleaseOnCancel defines if the leader should step down voluntarily
|
// LeaderElectionReleaseOnCancel defines if the leader should step down voluntarily
|
||||||
// when the Manager ends. This requires the binary to immediately end when the
|
// when the Manager ends. This requires the binary to immediately end when the
|
||||||
// Manager is stopped, otherwise, this setting is unsafe. Setting this significantly
|
// Manager is stopped, otherwise, this setting is unsafe. Setting this significantly
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
KUBE_VERSION=${KUBE_VERSION:-v1.22.7}
|
KUBE_VERSION=${KUBE_VERSION:-v1.22.7}
|
||||||
CLUSTER_NAME="${CLUSTER_NAME:-c3os-osbuilder-e2e}"
|
CLUSTER_NAME="${CLUSTER_NAME:-kairos-osbuilder-e2e}"
|
||||||
|
|
||||||
if ! kind get clusters | grep "$CLUSTER_NAME"; then
|
if ! kind get clusters | grep "$CLUSTER_NAME"; then
|
||||||
cat << EOF > kind.config
|
cat << EOF > kind.config
|
||||||
|
@ -13,7 +13,7 @@ var _ = Describe("ISO build test", func() {
|
|||||||
Context("registration", func() {
|
Context("registration", func() {
|
||||||
|
|
||||||
AfterEach(func() {
|
AfterEach(func() {
|
||||||
kubectl.New().Delete("osartifacts", "-n", "default", "hello-c3os")
|
kubectl.New().Delete("osartifacts", "-n", "default", "hello-kairos")
|
||||||
})
|
})
|
||||||
|
|
||||||
It("creates a simple iso", func() {
|
It("creates a simple iso", func() {
|
||||||
@ -21,16 +21,16 @@ var _ = Describe("ISO build test", func() {
|
|||||||
Expect(err).ToNot(HaveOccurred())
|
Expect(err).ToNot(HaveOccurred())
|
||||||
|
|
||||||
Eventually(func() string {
|
Eventually(func() string {
|
||||||
b, _ := kubectl.GetData("default", "osartifacts", "hello-c3os", "jsonpath={.spec.imageName}")
|
b, _ := kubectl.GetData("default", "osartifacts", "hello-kairos", "jsonpath={.spec.imageName}")
|
||||||
return string(b)
|
return string(b)
|
||||||
}, 2*time.Minute, 2*time.Second).Should(Equal("quay.io/c3os/c3os:opensuse-latest"))
|
}, 2*time.Minute, 2*time.Second).Should(Equal("quay.io/kairos/kairos:opensuse-latest"))
|
||||||
|
|
||||||
Eventually(func() string {
|
Eventually(func() string {
|
||||||
b, _ := kubectl.GetData("default", "deployments", "hello-c3os", "jsonpath={.spec.template.metadata.labels.osbuild}")
|
b, _ := kubectl.GetData("default", "deployments", "hello-kairos", "jsonpath={.spec.template.metadata.labels.osbuild}")
|
||||||
return string(b)
|
return string(b)
|
||||||
}, 2*time.Minute, 2*time.Second).Should(Equal("workloadhello-c3os"))
|
}, 2*time.Minute, 2*time.Second).Should(Equal("workloadhello-kairos"))
|
||||||
Eventually(func() string {
|
Eventually(func() string {
|
||||||
b, _ := kubectl.GetData("default", "deployments", "hello-c3os", "jsonpath={.spec.status.unavailableReplicas}")
|
b, _ := kubectl.GetData("default", "deployments", "hello-kairos", "jsonpath={.spec.status.unavailableReplicas}")
|
||||||
return string(b)
|
return string(b)
|
||||||
}, 15*time.Minute, 2*time.Second).ShouldNot(Equal("1"))
|
}, 15*time.Minute, 2*time.Second).ShouldNot(Equal("1"))
|
||||||
})
|
})
|
||||||
|
@ -9,5 +9,5 @@ import (
|
|||||||
|
|
||||||
func TestE2e(t *testing.T) {
|
func TestE2e(t *testing.T) {
|
||||||
RegisterFailHandler(Fail)
|
RegisterFailHandler(Fail)
|
||||||
RunSpecs(t, "c3os-operator e2e test Suite")
|
RunSpecs(t, "kairos-operator e2e test Suite")
|
||||||
}
|
}
|
||||||
|
8
tests/fixtures/simple.yaml
vendored
8
tests/fixtures/simple.yaml
vendored
@ -1,12 +1,12 @@
|
|||||||
apiVersion: build.c3os-x.io/v1alpha1
|
apiVersion: build.kairos.io/v1alpha1
|
||||||
kind: OSArtifact
|
kind: OSArtifact
|
||||||
metadata:
|
metadata:
|
||||||
name: hello-c3os
|
name: hello-kairos
|
||||||
spec:
|
spec:
|
||||||
imageName: "quay.io/c3os/c3os:opensuse-latest"
|
imageName: "quay.io/kairos/core-opensuse:latest"
|
||||||
iso: true
|
iso: true
|
||||||
bundles:
|
bundles:
|
||||||
- quay.io/c3os/packages:goreleaser-utils-1.11.1
|
- quay.io/kairos/packages:goreleaser-utils-1.11.1
|
||||||
grubConfig: |
|
grubConfig: |
|
||||||
search --file --set=root /boot/kernel.xz
|
search --file --set=root /boot/kernel.xz
|
||||||
set default=0
|
set default=0
|
||||||
|
Loading…
Reference in New Issue
Block a user