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

user sealer.io as apiversion #1951

Merged
merged 1 commit into from
Jan 5, 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
6 changes: 3 additions & 3 deletions cmd/sealer/cmd/utils/cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
)

func Test_ConstructClusterForScaleDown(t *testing.T) {
data := `apiVersion: sealer.cloud/v2
data := `apiVersion: sealer.io/v2
kind: Cluster
metadata:
creationTimestamp: null
Expand Down Expand Up @@ -125,7 +125,7 @@ func Test_ConstructClusterForScaleUp(t *testing.T) {
},
},
}
rawCluster.APIVersion = "sealer.cloud/v2"
rawCluster.APIVersion = "sealer.io/v2"
rawCluster.Kind = "Cluster"
rawCluster.Name = "mycluster"

Expand Down Expand Up @@ -174,7 +174,7 @@ func Test_ConstructClusterForScaleUp(t *testing.T) {
},
},
}
expectedCluster.APIVersion = "sealer.cloud/v2"
expectedCluster.APIVersion = "sealer.io/v2"
expectedCluster.Kind = "Cluster"
expectedCluster.Name = "mycluster"

Expand Down
2 changes: 1 addition & 1 deletion cmd/sealer/cmd/utils/hosts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
)

func Test_TransferIPStrToHosts(t *testing.T) {
data := `apiVersion: sealer.cloud/v2
data := `apiVersion: sealer.io/v2
kind: Cluster
metadata:
creationTimestamp: null
Expand Down
2 changes: 1 addition & 1 deletion common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const (

// API
const (
APIVersion = "sealer.cloud/v2"
APIVersion = "sealer.io/v2"
Kind = "Cluster"
)

Expand Down
2 changes: 1 addition & 1 deletion docs/api/clusterfile.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Clusterfile definition

```yaml
apiVersion: sealer.aliyun.com/v1alpha1
apiVersion: sealer.io/v1alpha1
kind: Cluster
metadata:
name: my-cluster
Expand Down
16 changes: 8 additions & 8 deletions docs/design/clusterfile-v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Clusterfile v1 not match some requirement.
* Delete all kubeadm config

```yaml
apiVersion: sealer.cloud/v2
apiVersion: sealer.io/v2
kind: Cluster
metadata:
name: my-cluster
Expand Down Expand Up @@ -52,7 +52,7 @@ spec:
3 masters and a node, It's so clearly and simple, cool

```yaml
apiVersion: sealer.cloud/v2
apiVersion: sealer.io/v2
kind: Cluster
metadata:
name: default-kubernetes-cluster
Expand All @@ -70,7 +70,7 @@ spec:
### Overwrite ssh config (for example password,and port)

```yaml
apiVersion: sealer.cloud/v2
apiVersion: sealer.io/v2
kind: Cluster
metadata:
name: default-kubernetes-cluster
Expand Down Expand Up @@ -268,7 +268,7 @@ controlPlane:
If you don't want to care about so much Kubeadm configs, you can use `KubeConfig` object to overwrite(json patch merge) some fields.

```yaml
apiVersion: sealer.cloud/v2
apiVersion: sealer.io/v2
kind: KubeadmConfig
metadata:
name: default-kubernetes-config
Expand Down Expand Up @@ -296,7 +296,7 @@ spec:
Using ENV in configs or yaml files [check this](https://github.com/sealerio/sealer/blob/main/docs/design/global-config.md#global-configuration)

```yaml
apiVersion: sealer.cloud/v2
apiVersion: sealer.io/v2
kind: Cluster
metadata:
name: my-cluster
Expand Down Expand Up @@ -329,14 +329,14 @@ If you're using public cloud, you needn't to config the ip field in Cluster Obje
apply resource from public cloud, then render the ip list to Cluster Object.

```yaml
apiVersion: sealer.cloud/v2
apiVersion: sealer.io/v2
kind: Cluster
metadata:
name: default-kubernetes-cluster
spec:
image: kubernetes:v1.19.8
---
apiVersion: sealer.cloud/v2
apiVersion: sealer.io/v2
kind: Infra
metadata:
name: alicloud
Expand All @@ -363,7 +363,7 @@ spec:
After `sealer apply -f Clusterfile`, The cluster object will update:

```yaml
apiVersion: sealer.cloud/v2
apiVersion: sealer.io/v2
kind: Cluster
metadata:
name: default-kubernetes-cluster
Expand Down
8 changes: 4 additions & 4 deletions docs/design/global-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ sealer run -e DashBoardPort=8443 mydashboard:latest -m xxx -n xxx -p xxx
Or specify in Clusterfile:

```yaml
apiVersion: sealer.aliyun.com/v1alpha1
apiVersion: sealer.io/v1alpha1
kind: Cluster
metadata:
name: my-cluster
Expand All @@ -77,15 +77,15 @@ Application config file:
Clusterfile:

```
apiVersion: sealer.aliyun.com/v1alpha1
apiVersion: sealer.io/v1alpha1
kind: Cluster
metadata:
name: my-cluster
spec:
image: registry.cn-qingdao.aliyuncs.com/sealer-app/my-SAAS-all-inone:latest
provider: BAREMETAL
---
apiVersion: sealer.aliyun.com/v1alpha1
apiVersion: sealer.io/v1alpha1
kind: Config
metadata:
name: mysql-config
Expand All @@ -96,7 +96,7 @@ spec:
mysql-passwd: xxx
...
---
apiVersion: sealer.aliyun.com/v1alpha1
apiVersion: sealer.io/v1alpha1
kind: Config
metadata:
name: redis-config
Expand Down
20 changes: 10 additions & 10 deletions docs/design/plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ HOSTNAME plugin will help you to change all the hostnames

```yaml
---
apiVersion: sealer.aliyun.com/v1alpha1
apiVersion: sealer.io/v1alpha1
kind: Plugin
metadata:
name: MyHostname # Specify this plugin name,will dump in $rootfs/plugins dir.
Expand All @@ -29,7 +29,7 @@ spec:
You can exec any shell command on specify node in any phase.

```yaml
apiVersion: sealer.aliyun.com/v1alpha1
apiVersion: sealer.io/v1alpha1
kind: Plugin
metadata:
name: MyShell # Specify this plugin name,will dump in $rootfs/plugins dir.
Expand Down Expand Up @@ -65,7 +65,7 @@ data : #Specifies the shell command to execute
Help you set label after install kubernetes cluster

```yaml
apiVersion: sealer.aliyun.com/v1alpha1
apiVersion: sealer.io/v1alpha1
kind: Plugin
metadata:
name: MyLabel
Expand All @@ -87,7 +87,7 @@ Server and environmental factors (poor server disk performance) may cause Sealer
The Cluster Check plugin waits for the Kubernetes cluster to stabilize before deploying the application service.

```yaml
apiVersion: sealer.aliyun.com/v1alpha1
apiVersion: sealer.io/v1alpha1
kind: Plugin
metadata:
name: checkCluster
Expand All @@ -99,7 +99,7 @@ spec:
### Etcd backup plugin

```yaml
apiVersion: sealer.aliyun.com/v1alpha1
apiVersion: sealer.io/v1alpha1
kind: Plugin
metadata:
name: MyBackup
Expand All @@ -115,7 +115,7 @@ Etcd backup plugin is triggered manually: `sealer plugin -f etcd_backup.yaml`
Add or remove taint by adding the taint plugin for the PreGuest phase:

```yaml
apiVersion: sealer.aliyun.com/v1alpha1
apiVersion: sealer.io/v1alpha1
kind: Plugin
metadata:
name: taint
Expand Down Expand Up @@ -147,7 +147,7 @@ it.
plugin config:

```yaml
apiVersion: sealer.aliyun.com/v1alpha1
apiVersion: sealer.io/v1alpha1
kind: Plugin
metadata:
name: label_nodes.so # out of tree plugin name
Expand Down Expand Up @@ -179,7 +179,7 @@ sealer build -m lite -t kubernetes-post-install:v1.19.8 .
For example, set node label after install kubernetes cluster:

```yaml
apiVersion: sealer.cloud/v2
apiVersion: sealer.io/v2
kind: Cluster
metadata:
name: default-kubernetes-cluster
Expand All @@ -193,7 +193,7 @@ spec:
- ips: [ 192.168.0.5 ]
roles: [ node ]
---
apiVersion: sealer.aliyun.com/v1alpha1
apiVersion: sealer.io/v1alpha1
kind: Plugin
metadata:
name: LABEL
Expand All @@ -219,7 +219,7 @@ image.
Plugin configuration shell.yaml:

```yaml
apiVersion: sealer.aliyun.com/v1alpha1
apiVersion: sealer.io/v1alpha1
kind: Plugin
metadata:
name: SHELL
Expand Down
12 changes: 6 additions & 6 deletions pkg/cluster-runtime/hook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ package clusterruntime
// }
// plugin1.Name = "pre-init-host2"
// plugin1.Kind = "Plugin"
// plugin1.APIVersion = "sealer.aliyun.com/v1alpha1"
// plugin1.APIVersion = "sealer.io/v1alpha1"
//
// plugin2 := v1.Plugin{
// Spec: v1.PluginSpec{
Expand All @@ -37,7 +37,7 @@ package clusterruntime
// }
// plugin2.Name = "post-init-host2"
// plugin2.Kind = "Plugin"
// plugin2.APIVersion = "sealer.aliyun.com/v1alpha1"
// plugin2.APIVersion = "sealer.io/v1alpha1"
//
// type args struct {
// data string
Expand Down Expand Up @@ -81,7 +81,7 @@ package clusterruntime
// }
// plugin1.Name = "MyHostname1"
// plugin1.Kind = "Plugin"
// plugin1.APIVersion = "sealer.aliyun.com/v1alpha1"
// plugin1.APIVersion = "sealer.io/v1alpha1"
//
// plugin2 := v1.Plugin{
// Spec: v1.PluginSpec{
Expand All @@ -93,7 +93,7 @@ package clusterruntime
// }
// plugin2.Name = "MyShell1"
// plugin2.Kind = "Plugin"
// plugin2.APIVersion = "sealer.aliyun.com/v1alpha1"
// plugin2.APIVersion = "sealer.io/v1alpha1"
//
// plugin3 := v1.Plugin{
// Spec: v1.PluginSpec{
Expand All @@ -105,7 +105,7 @@ package clusterruntime
// }
// plugin3.Name = "MyHostname2"
// plugin3.Kind = "Plugin"
// plugin3.APIVersion = "sealer.aliyun.com/v1alpha1"
// plugin3.APIVersion = "sealer.io/v1alpha1"
//
// plugin4 := v1.Plugin{
// Spec: v1.PluginSpec{
Expand All @@ -117,7 +117,7 @@ package clusterruntime
// }
// plugin4.Name = "MyShell2"
// plugin4.Kind = "Plugin"
// plugin4.APIVersion = "sealer.aliyun.com/v1alpha1"
// plugin4.APIVersion = "sealer.io/v1alpha1"
//
// wanted := map[Phase]HookConfigList{
// Phase("pre-init-host"): []HookConfig{
Expand Down
4 changes: 2 additions & 2 deletions pkg/cluster-runtime/test/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.

---
apiVersion: sealer.aliyun.com/v1alpha1
apiVersion: sealer.io/v1alpha1
kind: Plugin
metadata:
name: pre-init-host2
Expand All @@ -25,7 +25,7 @@ spec:
echo "i am pre-init-host2 from rootfs"

---
apiVersion: sealer.aliyun.com/v1alpha1
apiVersion: sealer.io/v1alpha1
kind: Plugin
metadata:
name: post-init-host2
Expand Down
4 changes: 2 additions & 2 deletions pkg/clusterfile/clusterfile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func TestSaveAll(t *testing.T) {
},
},
}
cluster.APIVersion = "sealer.cloud/v2"
cluster.APIVersion = "sealer.io/v2"
cluster.Kind = "Cluster"
cluster.Name = "my-cluster"

Expand All @@ -85,7 +85,7 @@ func TestSaveAll(t *testing.T) {
}
plugin2.Name = "MyShell"
plugin2.Kind = "Plugin"
plugin2.APIVersion = "sealer.aliyun.com/v1alpha1"
plugin2.APIVersion = "sealer.io/v1alpha1"

config := v1.Config{
Spec: v1.ConfigSpec{
Expand Down
12 changes: 6 additions & 6 deletions pkg/clusterfile/decoder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ spec:
mysql-user: root
mysql-passwd: xxx
---
apiVersion: sealer.aliyun.com/v1alpha1
apiVersion: sealer.io/v1alpha1
kind: Plugin
metadata:
name: MyHostname # Specify this plugin name,will dump in $rootfs/plugins dir.
Expand All @@ -48,7 +48,7 @@ spec:
data: |
192.168.0.2 master-0
---
apiVersion: sealer.aliyun.com/v1alpha1
apiVersion: sealer.io/v1alpha1
kind: Plugin
metadata:
name: MyShell # Specify this plugin name,will dump in $rootfs/plugins dir.
Expand All @@ -59,7 +59,7 @@ spec:
data: |
kubectl get nodes
---
apiVersion: sealer.cloud/v2
apiVersion: sealer.io/v2
kind: Cluster
metadata:
name: my-cluster
Expand Down Expand Up @@ -100,7 +100,7 @@ ipvs:
excludeCIDRs:
- "10.103.97.2/32"`

const APIVersion = "sealer.aliyun.com/v1alpha1"
const APIVersion = "sealer.io/v1alpha1"

func TestDecodeClusterFile(t *testing.T) {
cluster := v2.Cluster{
Expand Down Expand Up @@ -142,7 +142,7 @@ func TestDecodeClusterFile(t *testing.T) {
},
},
}
cluster.APIVersion = "sealer.cloud/v2"
cluster.APIVersion = "sealer.io/v2"
cluster.Kind = "Cluster"
cluster.Name = "my-cluster"

Expand All @@ -167,7 +167,7 @@ func TestDecodeClusterFile(t *testing.T) {
}
plugin2.Name = "MyShell"
plugin2.Kind = "Plugin"
plugin2.APIVersion = "sealer.aliyun.com/v1alpha1"
plugin2.APIVersion = "sealer.io/v1alpha1"

config := v1.Config{
Spec: v1.ConfigSpec{
Expand Down
Loading