This is an automated email from the ASF dual-hosted git repository.

jimin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-seata-k8s.git


The following commit(s) were added to refs/heads/master by this push:
     new 569aca8  feature: add controller docker CI (#11)
569aca8 is described below

commit 569aca8346d606583373121abe028c977678f7a3
Author: Xiangkun Yin <[email protected]>
AuthorDate: Wed Jan 17 10:23:42 2024 +0800

    feature: add controller docker CI (#11)
---
 .github/workflows/build.yml                        | 24 ++++++++++++++++
 .github/workflows/publish-docker.yml               | 32 ++++++++++++++++++++++
 Makefile                                           |  6 ++--
 PROJECT                                            |  8 +++---
 README.md                                          | 16 ++++++-----
 README.zh.md                                       | 20 ++++++++------
 api/v1alpha1/common.go                             | 15 +++++-----
 api/v1alpha1/groupversion_info.go                  | 17 ++++++------
 api/v1alpha1/seataserver_types.go                  | 15 +++++-----
 api/v1alpha1/zz_generated.deepcopy.go              | 15 +++++-----
 ...=> operator.seata.apache.org_seataservers.yaml} |  4 +--
 config/crd/kustomization.yaml                      |  2 +-
 .../crd/patches/cainjection_in_seataservers.yaml   |  2 +-
 config/crd/patches/webhook_in_seataservers.yaml    |  2 +-
 config/manager/kustomization.yaml                  |  2 +-
 config/rbac/role.yaml                              |  6 ++--
 config/rbac/seataserver_editor_role.yaml           |  4 +--
 config/rbac/seataserver_viewer_role.yaml           |  4 +--
 config/samples/seata_v1alpha1_seataserver.yaml     |  2 +-
 controllers/seataserver_controller.go              | 21 +++++++-------
 controllers/service.go                             | 15 +++++-----
 controllers/stateful_set.go                        | 15 +++++-----
 controllers/suite_test.go                          | 15 +++++-----
 deploy/seata-server-cluster.yaml                   |  4 +--
 go.mod                                             |  2 +-
 hack/boilerplate.go.txt                            | 15 +++++-----
 main.go                                            | 19 +++++++------
 27 files changed, 186 insertions(+), 116 deletions(-)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 0000000..c296d26
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,24 @@
+name: build
+
+on:
+  push:
+    branches: [ master ]
+  pull_request:
+    branches: [ master ]
+
+jobs:
+  build:
+    name: build
+    runs-on: ubuntu-latest
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v3
+
+      - name: Set up QEMU
+        uses: docker/setup-qemu-action@v3
+
+      - name: Set up Docker Buildx
+        uses: docker/setup-buildx-action@v3
+
+      - name: Docker Build And Go Test
+        run: make docker-build
diff --git a/.github/workflows/publish-docker.yml 
b/.github/workflows/publish-docker.yml
new file mode 100644
index 0000000..371b1e1
--- /dev/null
+++ b/.github/workflows/publish-docker.yml
@@ -0,0 +1,32 @@
+name: Publish Docker
+
+on:
+  push:
+    branches: [ master, "*.*.*" ]
+
+jobs:
+  build:
+    runs-on: ubuntu-latest
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v3
+
+      - name: Set up QEMU
+        uses: docker/setup-qemu-action@v3
+
+      - name: Set up Docker Buildx
+        uses: docker/setup-buildx-action@v3
+
+      - name: Login to Docker Hub
+        uses: docker/login-action@v3
+        with:
+          username: ${{ secrets.DOCKERHUB_USER }}
+          password: ${{ secrets.DOCKERHUB_TOKEN }}
+
+      - name: Docker Build and Push
+        run: |
+          if [ "${{ github.ref_name }}" == "master" ]; then
+            make docker-build docker-push
+          else
+            IMG=apache/seata-controller:${{ github.ref_name }} make 
docker-build docker-push
+          fi
diff --git a/Makefile b/Makefile
index d62466b..341baf9 100644
--- a/Makefile
+++ b/Makefile
@@ -28,8 +28,8 @@ BUNDLE_METADATA_OPTS ?= $(BUNDLE_CHANNELS) 
$(BUNDLE_DEFAULT_CHANNEL)
 # 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
-# seata.io/seata-k8s-bundle:$VERSION and seata.io/seata-k8s-catalog:$VERSION.
-IMAGE_TAG_BASE ?= seata.io/seata-k8s
+# seata.apache.org/seata-k8s-bundle:$VERSION and 
seata.apache.org/seata-k8s-catalog:$VERSION.
+IMAGE_TAG_BASE ?= seata.apache.org/seata-k8s
 
 # 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>)
@@ -51,7 +51,7 @@ endif
 OPERATOR_SDK_VERSION ?= v1.32.0
 
 # Image URL to use all building/pushing image targets
-IMG ?= seata-controller:latest
+IMG ?= docker.io/apache/seata-controller:latest
 # ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be 
downloaded by envtest binary.
 ENVTEST_K8S_VERSION = 1.26.0
 
diff --git a/PROJECT b/PROJECT
index 91dfc73..866c37e 100644
--- a/PROJECT
+++ b/PROJECT
@@ -2,22 +2,22 @@
 # This file is used to track the info used to scaffold your project
 # and allow the plugins properly work.
 # More info: https://book.kubebuilder.io/reference/project-config.html
-domain: seata.io
+domain: seata.apache.org
 layout:
 - go.kubebuilder.io/v3
 plugins:
   manifests.sdk.operatorframework.io/v2: {}
   scorecard.sdk.operatorframework.io/v2: {}
 projectName: seata-k8s
-repo: github.com/seata/seata-k8s
+repo: github.com/apache/incubator-seata-k8s
 resources:
 - api:
     crdVersion: v1
     namespaced: true
   controller: true
-  domain: seata.io
+  domain: seata.apache.org
   group: operator
   kind: SeataServer
-  path: github.com/seata/seata-k8s/api/v1alpha1
+  path: github.com/apache/seata-k8s/api/v1alpha1
   version: v1alpha1
 version: "3"
diff --git a/README.md b/README.md
index be897f0..983abe1 100644
--- a/README.md
+++ b/README.md
@@ -12,7 +12,7 @@ Associated Projects:
 
 ### Usage
 
-We haven't officially released the Controller image yet. To experience 
deploying Seata Server using the Operator method, follow these steps:
+To experience deploying Seata Server using the Operator method, follow these 
steps:
 
 1. Clone this repository:
 
@@ -20,7 +20,9 @@ We haven't officially released the Controller image yet. To 
experience deploying
    git clone https://github.com/apache/incubator-seata-k8s.git
    ```
 
-2. Publish the controller image to a private registry:
+2. (Optional) Build and publish the controller image to a private registry:
+
+   > This step can be skipped, the operator use apache/seata-controller:latest 
as controller image by default.
 
    ```shell
    IMG=${IMAGE-TO-PUSH} make docker-build docker-push
@@ -30,7 +32,7 @@ We haven't officially released the Controller image yet. To 
experience deploying
 
    ```shell
    eval $(minikube docker-env)
-   make docker-build
+   IMG=${IMAGE-TO-PUSH} make docker-build
    ```
 
 3. Deploy Controller, CRD, RBAC, and other resources to the Kubernetes cluster:
@@ -43,7 +45,7 @@ We haven't officially released the Controller image yet. To 
experience deploying
 4. You can now deploy your CR to the cluster. An example can be found here 
[seata-server-cluster.yaml](deploy/seata-server-cluster.yaml):
 
    ```yaml
-   apiVersion: operator.seata.io/v1alpha1
+   apiVersion: operator.seata.apache.org/v1alpha1
    kind: SeataServer
    metadata:
      name: seata-server
@@ -62,7 +64,7 @@ We haven't officially released the Controller image yet. To 
experience deploying
 
 ### Reference
 
-For CRD details, you can visit 
[operator.seata.io_seataservers.yaml](config/crd/bases/operator.seata.io_seataservers.yaml).
 Here are some important configurations:
+For CRD details, you can visit 
[operator.seata.apache.org_seataservers.yaml](config/crd/bases/operator.seata.apache.org_seataservers.yaml).
 Here are some important configurations:
 
 1. `serviceName`: Used to define the name of the Headless Service deployed by 
the controller. This will affect how you access the server cluster. In the 
example above, you can access the Seata Server cluster through 
`seata-server-0.seata-server-cluster.default.svc`.
 
@@ -79,7 +81,7 @@ For CRD details, you can visit 
[operator.seata.io_seataservers.yaml](config/crd/
 7. `env`: Environment variables passed to the container. You can use this 
field to define Seata Server configuration. For example:
 
    ```yaml
-   apiVersion: operator.seata.io/v1alpha1
+   apiVersion: operator.seata.apache.org/v1alpha1
    kind: SeataServer
    metadata:
      name: seata-server
@@ -92,7 +94,7 @@ For CRD details, you can visit 
[operator.seata.io_seataservers.yaml](config/crd/
            storage: 5Gi
      env:
        console.user.username: seata
-       console.user.username: seata
+       console.user.password: seata
    ```
 
 ## Method 2: Example without Using Operator
diff --git a/README.zh.md b/README.zh.md
index 929fd0a..86ffc87 100755
--- a/README.zh.md
+++ b/README.zh.md
@@ -16,7 +16,7 @@ https://github.com/seata/seata-docker
 
 ### Usage
 
-我们暂未没发布官方的 Controller 镜像,想要体验 Operator 方式部署 Seata Server 可以参照以下方式进行:
+想要体验 Operator 方式部署 Seata Server 可以参照以下方式进行:
 
 1. 克隆本仓库
 
@@ -24,7 +24,9 @@ https://github.com/seata/seata-docker
    git clone https://github.com/apache/incubator-seata-k8s.git
    ```
 
-2. 发布 controller 镜像到私有 Registry
+2. (可选) 发布 controller 镜像到私有 Registry
+
+   > 这一步可以跳过,本 Operator 默认使用 `apache/seata-controller:latest` 作为 controller 镜像
 
    ```shell
    IMG=${IMAGE-TO-PUSH} make docker-build docker-push
@@ -34,7 +36,7 @@ https://github.com/seata/seata-docker
 
    ```shell
    eval $(minikube docker-env)
-   make docker-build
+   IMG=${IMAGE-TO-PUSH} make docker-build
    ```
 
 3. 部署 Controller, CRD, RBAC 等资源到 Kubernetes 集群
@@ -47,7 +49,7 @@ https://github.com/seata/seata-docker
 4. 此时即可发布你的 CR 到集群当中了,示例可以在这里找到 
[seata-server-cluster.yaml](deploy/seata-server-cluster.yaml)
 
    ```yaml
-   apiVersion: operator.seata.io/v1alpha1
+   apiVersion: operator.seata.apache.org/v1alpha1
    kind: SeataServer
    metadata:
      name: seata-server
@@ -67,7 +69,7 @@ https://github.com/seata/seata-docker
 
 ### Reference
 
-关于 CRD 可以访问  
[operator.seata.io_seataservers.yaml](config/crd/bases/operator.seata.io_seataservers.yaml)
 以查看详细定义,这里列举出一些重要的配置并进行解读。
+关于 CRD 可以访问  
[operator.seata.apache.org_seataservers.yaml](config/crd/bases/operator.seata.apache.org_seataservers.yaml)
 以查看详细定义,这里列举出一些重要的配置并进行解读。
 
 1. `serviceName`: 用于定义 controller 部署的 Headless Service 的名称,这会影响你访问 server 
集群的方式,比如在之前的示例中,你可以通过 seata-server-0.seata-server-cluster.default.svc 进行访问。
 
@@ -84,7 +86,7 @@ https://github.com/seata/seata-docker
 7. `env`: 传递给容器的环境变量,可以通过此字段去定义 Seata Server 的配置,比如:
 
    ```yaml
-   apiVersion: operator.seata.io/v1alpha1
+   apiVersion: operator.seata.apache.org/v1alpha1
    kind: SeataServer
    metadata:
      name: seata-server
@@ -95,9 +97,9 @@ https://github.com/seata/seata-docker
        resources:
          requests:
            storage: 5Gi
-       env:
-               console.user.username: seata
-               console.user.username: seata
+     env:
+       console.user.username: seata
+       console.user.password: seata
    ```
    
    
diff --git a/api/v1alpha1/common.go b/api/v1alpha1/common.go
index 84507e9..09ff02a 100644
--- a/api/v1alpha1/common.go
+++ b/api/v1alpha1/common.go
@@ -1,11 +1,12 @@
 /*
-Copyright 1999-2019 Seata.io Group.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
 
 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/api/v1alpha1/groupversion_info.go 
b/api/v1alpha1/groupversion_info.go
index 61f2dea..5f90d96 100644
--- a/api/v1alpha1/groupversion_info.go
+++ b/api/v1alpha1/groupversion_info.go
@@ -1,11 +1,12 @@
 /*
-Copyright 1999-2019 Seata.io Group.
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
+    http://www.apache.org/licenses/LICENSE-2.0
 
 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
@@ -16,7 +17,7 @@ limitations under the License.
 
 // Package v1alpha1 contains API Schema definitions for the seata v1alpha1 API 
group
 // +kubebuilder:object:generate=true
-// +groupName=operator.seata.io
+// +groupName=operator.seata.apache.org
 package v1alpha1
 
 import (
@@ -26,7 +27,7 @@ import (
 
 var (
        // GroupVersion is group version used to register these objects
-       GroupVersion = schema.GroupVersion{Group: "operator.seata.io", Version: 
"v1alpha1"}
+       GroupVersion = schema.GroupVersion{Group: "operator.seata.apache.org", 
Version: "v1alpha1"}
 
        // SchemeBuilder is used to add go types to the GroupVersionKind scheme
        SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}
diff --git a/api/v1alpha1/seataserver_types.go 
b/api/v1alpha1/seataserver_types.go
index 84d250e..cca053e 100644
--- a/api/v1alpha1/seataserver_types.go
+++ b/api/v1alpha1/seataserver_types.go
@@ -1,11 +1,12 @@
 /*
-Copyright 1999-2019 Seata.io Group.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
 
 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/api/v1alpha1/zz_generated.deepcopy.go 
b/api/v1alpha1/zz_generated.deepcopy.go
index 5ab26c8..35277bb 100644
--- a/api/v1alpha1/zz_generated.deepcopy.go
+++ b/api/v1alpha1/zz_generated.deepcopy.go
@@ -1,13 +1,14 @@
 //go:build !ignore_autogenerated
 
 /*
-Copyright 1999-2019 Seata.io Group.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
 
 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/config/crd/bases/operator.seata.io_seataservers.yaml 
b/config/crd/bases/operator.seata.apache.org_seataservers.yaml
similarity index 99%
rename from config/crd/bases/operator.seata.io_seataservers.yaml
rename to config/crd/bases/operator.seata.apache.org_seataservers.yaml
index ebc1b5e..4329b31 100644
--- a/config/crd/bases/operator.seata.io_seataservers.yaml
+++ b/config/crd/bases/operator.seata.apache.org_seataservers.yaml
@@ -4,9 +4,9 @@ kind: CustomResourceDefinition
 metadata:
   annotations:
     controller-gen.kubebuilder.io/version: v0.13.0
-  name: seataservers.operator.seata.io
+  name: seataservers.operator.seata.apache.org
 spec:
-  group: operator.seata.io
+  group: operator.seata.apache.org
   names:
     kind: SeataServer
     listKind: SeataServerList
diff --git a/config/crd/kustomization.yaml b/config/crd/kustomization.yaml
index ca9a020..307108b 100644
--- a/config/crd/kustomization.yaml
+++ b/config/crd/kustomization.yaml
@@ -2,7 +2,7 @@
 # since it depends on service name and namespace that are out of this 
kustomize package.
 # It should be run by config/default
 resources:
-- bases/operator.seata.io_seataservers.yaml
+- bases/operator.seata.apache.org_seataservers.yaml
 #+kubebuilder:scaffold:crdkustomizeresource
 
 patchesStrategicMerge:
diff --git a/config/crd/patches/cainjection_in_seataservers.yaml 
b/config/crd/patches/cainjection_in_seataservers.yaml
index 4312337..840e803 100644
--- a/config/crd/patches/cainjection_in_seataservers.yaml
+++ b/config/crd/patches/cainjection_in_seataservers.yaml
@@ -4,4 +4,4 @@ kind: CustomResourceDefinition
 metadata:
   annotations:
     cert-manager.io/inject-ca-from: 
$(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
-  name: seataservers.operator.seata.io
+  name: seataservers.operator.seata.apache.org
diff --git a/config/crd/patches/webhook_in_seataservers.yaml 
b/config/crd/patches/webhook_in_seataservers.yaml
index 06f8f59..b8d9c8c 100644
--- a/config/crd/patches/webhook_in_seataservers.yaml
+++ b/config/crd/patches/webhook_in_seataservers.yaml
@@ -2,7 +2,7 @@
 apiVersion: apiextensions.k8s.io/v1
 kind: CustomResourceDefinition
 metadata:
-  name: seataservers.operator.seata.io
+  name: seataservers.operator.seata.apache.org
 spec:
   conversion:
     strategy: Webhook
diff --git a/config/manager/kustomization.yaml 
b/config/manager/kustomization.yaml
index 9ff6c9c..1354aef 100644
--- a/config/manager/kustomization.yaml
+++ b/config/manager/kustomization.yaml
@@ -4,5 +4,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1
 kind: Kustomization
 images:
 - name: controller
-  newName: seata-controller
+  newName: docker.io/apache/seata-controller
   newTag: latest
diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml
index 79613c6..f2b3a78 100644
--- a/config/rbac/role.yaml
+++ b/config/rbac/role.yaml
@@ -44,7 +44,7 @@ rules:
   - update
   - watch
 - apiGroups:
-  - operator.seata.io
+  - operator.seata.apache.org
   resources:
   - seataservers
   verbs:
@@ -56,13 +56,13 @@ rules:
   - update
   - watch
 - apiGroups:
-  - operator.seata.io
+  - operator.seata.apache.org
   resources:
   - seataservers/finalizers
   verbs:
   - update
 - apiGroups:
-  - operator.seata.io
+  - operator.seata.apache.org
   resources:
   - seataservers/status
   verbs:
diff --git a/config/rbac/seataserver_editor_role.yaml 
b/config/rbac/seataserver_editor_role.yaml
index b64a7f2..62cbe26 100644
--- a/config/rbac/seataserver_editor_role.yaml
+++ b/config/rbac/seataserver_editor_role.yaml
@@ -12,7 +12,7 @@ metadata:
   name: seataserver-editor-role
 rules:
 - apiGroups:
-  - operator.seata.io
+  - operator.seata.apache.org
   resources:
   - seataservers
   verbs:
@@ -24,7 +24,7 @@ rules:
   - update
   - watch
 - apiGroups:
-  - operator.seata.io
+  - operator.seata.apache.org
   resources:
   - seataservers/status
   verbs:
diff --git a/config/rbac/seataserver_viewer_role.yaml 
b/config/rbac/seataserver_viewer_role.yaml
index 79375f6..5bf1a30 100644
--- a/config/rbac/seataserver_viewer_role.yaml
+++ b/config/rbac/seataserver_viewer_role.yaml
@@ -12,7 +12,7 @@ metadata:
   name: seataserver-viewer-role
 rules:
 - apiGroups:
-  - operator.seata.io
+  - operator.seata.apache.org
   resources:
   - seataservers
   verbs:
@@ -20,7 +20,7 @@ rules:
   - list
   - watch
 - apiGroups:
-  - operator.seata.io
+  - operator.seata.apache.org
   resources:
   - seataservers/status
   verbs:
diff --git a/config/samples/seata_v1alpha1_seataserver.yaml 
b/config/samples/seata_v1alpha1_seataserver.yaml
index c6f6b1d..05c68f3 100644
--- a/config/samples/seata_v1alpha1_seataserver.yaml
+++ b/config/samples/seata_v1alpha1_seataserver.yaml
@@ -1,4 +1,4 @@
-apiVersion: operator.seata.io/v1alpha1
+apiVersion: operator.seata.apache.org/v1alpha1
 kind: SeataServer
 metadata:
   labels:
diff --git a/controllers/seataserver_controller.go 
b/controllers/seataserver_controller.go
index 3dff9a4..e64e095 100644
--- a/controllers/seataserver_controller.go
+++ b/controllers/seataserver_controller.go
@@ -1,11 +1,12 @@
 /*
-Copyright 1999-2019 Seata.io Group.
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
+    http://www.apache.org/licenses/LICENSE-2.0
 
 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
@@ -27,7 +28,7 @@ import (
        "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"
        "sigs.k8s.io/controller-runtime/pkg/log"
 
-       seatav1alpha1 "github.com/seata/seata-k8s/api/v1alpha1"
+       seatav1alpha1 "github.com/apache/seata-k8s/api/v1alpha1"
 )
 
 // SeataServerReconciler reconciles a SeataServer object
@@ -36,9 +37,9 @@ type SeataServerReconciler struct {
        Scheme *runtime.Scheme
 }
 
-//+kubebuilder:rbac:groups=operator.seata.io,resources=seataservers,verbs=get;list;watch;create;update;patch;delete
-//+kubebuilder:rbac:groups=operator.seata.io,resources=seataservers/status,verbs=get;update;patch
-//+kubebuilder:rbac:groups=operator.seata.io,resources=seataservers/finalizers,verbs=update
+//+kubebuilder:rbac:groups=operator.seata.apache.org,resources=seataservers,verbs=get;list;watch;create;update;patch;delete
+//+kubebuilder:rbac:groups=operator.seata.apache.org,resources=seataservers/status,verbs=get;update;patch
+//+kubebuilder:rbac:groups=operator.seata.apache.org,resources=seataservers/finalizers,verbs=update
 //+kubebuilder:rbac:groups=core,resources=events,verbs=create;patch
 
//+kubebuilder:rbac:groups=core,resources=services,verbs=get;list;watch;create;update;patch;delete
 
//+kubebuilder:rbac:groups=apps,resources=statefulsets,verbs=get;list;watch;create;update;patch;delete
diff --git a/controllers/service.go b/controllers/service.go
index 40338f4..9da08d1 100644
--- a/controllers/service.go
+++ b/controllers/service.go
@@ -1,11 +1,12 @@
 /*
-Copyright 1999-2019 Seata.io Group.
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
+    http://www.apache.org/licenses/LICENSE-2.0
 
 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
@@ -17,7 +18,7 @@ limitations under the License.
 package controllers
 
 import (
-       seatav1alpha1 "github.com/seata/seata-k8s/api/v1alpha1"
+       seatav1alpha1 "github.com/apache/seata-k8s/api/v1alpha1"
        apiv1 "k8s.io/api/core/v1"
        metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 )
diff --git a/controllers/stateful_set.go b/controllers/stateful_set.go
index cd35650..0c1b340 100644
--- a/controllers/stateful_set.go
+++ b/controllers/stateful_set.go
@@ -1,11 +1,12 @@
 /*
-Copyright 1999-2019 Seata.io Group.
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
+    http://www.apache.org/licenses/LICENSE-2.0
 
 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
@@ -21,8 +22,8 @@ import (
        "context"
        "errors"
        "fmt"
+       seatav1alpha1 "github.com/apache/seata-k8s/api/v1alpha1"
        "github.com/go-logr/logr"
-       seatav1alpha1 "github.com/seata/seata-k8s/api/v1alpha1"
        "io"
        appsv1 "k8s.io/api/apps/v1"
        apiv1 "k8s.io/api/core/v1"
diff --git a/controllers/suite_test.go b/controllers/suite_test.go
index d14396a..379b610 100644
--- a/controllers/suite_test.go
+++ b/controllers/suite_test.go
@@ -1,11 +1,12 @@
 /*
-Copyright 1999-2019 Seata.io Group.
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
+    http://www.apache.org/licenses/LICENSE-2.0
 
 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
@@ -30,7 +31,7 @@ import (
        logf "sigs.k8s.io/controller-runtime/pkg/log"
        "sigs.k8s.io/controller-runtime/pkg/log/zap"
 
-       seatav1alpha1 "github.com/seata/seata-k8s/api/v1alpha1"
+       seatav1alpha1 "github.com/apache/seata-k8s/api/v1alpha1"
        //+kubebuilder:scaffold:imports
 )
 
diff --git a/deploy/seata-server-cluster.yaml b/deploy/seata-server-cluster.yaml
index fce1189..b5fdbb5 100644
--- a/deploy/seata-server-cluster.yaml
+++ b/deploy/seata-server-cluster.yaml
@@ -1,11 +1,11 @@
-apiVersion: operator.seata.io/v1alpha1
+apiVersion: operator.seata.apache.org/v1alpha1
 kind: SeataServer
 metadata:
   name: seata-server
   namespace: default
 spec:
   serviceName: seata-server-cluster
-  replicas: 3
+  replicas: 2
   image: seataio/seata-server:latest
   store:
     resources:
diff --git a/go.mod b/go.mod
index f68d484..d3dc366 100644
--- a/go.mod
+++ b/go.mod
@@ -1,4 +1,4 @@
-module github.com/seata/seata-k8s
+module github.com/apache/seata-k8s
 
 go 1.19
 
diff --git a/hack/boilerplate.go.txt b/hack/boilerplate.go.txt
index 71a0b02..e9090fc 100644
--- a/hack/boilerplate.go.txt
+++ b/hack/boilerplate.go.txt
@@ -1,15 +1,16 @@
 /*
-Copyright 1999-2019 Seata.io Group.
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
+    http://www.apache.org/licenses/LICENSE-2.0
 
 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-*/
\ No newline at end of file
+*/
diff --git a/main.go b/main.go
index f160dda..bf2857f 100644
--- a/main.go
+++ b/main.go
@@ -1,11 +1,12 @@
 /*
-Copyright 1999-2019 Seata.io Group.
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
+    http://www.apache.org/licenses/LICENSE-2.0
 
 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
@@ -32,8 +33,8 @@ import (
        "sigs.k8s.io/controller-runtime/pkg/healthz"
        "sigs.k8s.io/controller-runtime/pkg/log/zap"
 
-       seatav1alpha1 "github.com/seata/seata-k8s/api/v1alpha1"
-       "github.com/seata/seata-k8s/controllers"
+       seatav1alpha1 "github.com/apache/seata-k8s/api/v1alpha1"
+       "github.com/apache/seata-k8s/controllers"
        //+kubebuilder:scaffold:imports
 )
 
@@ -71,7 +72,7 @@ func main() {
                Metrics:                metricsserver.Options{BindAddress: 
metricsAddr},
                HealthProbeBindAddress: probeAddr,
                LeaderElection:         enableLeaderElection,
-               LeaderElectionID:       "e60df718.seata.io",
+               LeaderElectionID:       "e60df718.seata.apache.org",
                // LeaderElectionReleaseOnCancel defines if the leader should 
step down voluntarily
                // when the Manager ends. This requires the binary to 
immediately end when the
                // Manager is stopped, otherwise, this setting is unsafe. 
Setting this significantly


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to