Skip to content

Kubernetes controller for managing Huawei Cloud Container Engine (CCE) in Rancher.

License

Notifications You must be signed in to change notification settings

cnrancher/cce-operator

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

643e210 · Mar 4, 2024

History

59 Commits
Dec 4, 2023
Jan 10, 2024
Jul 7, 2023
Mar 4, 2024
Aug 1, 2023
Jul 13, 2023
Jun 28, 2023
Dec 4, 2023
Jun 28, 2023
Jun 28, 2023
Oct 23, 2023
Mar 4, 2024
Mar 4, 2024
Mar 4, 2024

Repository files navigation

cnrancher/cce-operator

Build Status Docker Pulls Go Report Card

Kubernetes controller for managing Huawei Cloud Container Engine (CCE) in Rancher.

Develop

The easiest way to debug and develop the operator is to replace the default operator on a running Rancher instance with your local one (see eks-operator).

You can also build and debug CCE Operator without Rancher by following these steps:

  1. Setup a kubernetes cluster and configure the KUBECONFIG file.

    $ export KUBECONFIG="$HOME/.kube/config"
  2. Create a Opaque type secret (huawei cloud credential) in namespace cattle-global-data.

    $ kubectl create namespace cattle-global-data
    apiVersion: v1
    kind: Secret
    type: Opaque
    metadata:
        name: "cc-test-cce" # Modify the secret name if needed.
        namespace: cattle-global-data
    data:
        huaweicredentialConfig-accessKey: "[base64_encoded_access_key]"
        huaweicredentialConfig-secretKey: "[base64_encoded_secret_key]"
        huaweicredentialConfig-projectID: "[base64_encoded_project_id]"
        huaweicredentialConfig-regionID: "[base64_encoded_region_id]"
  3. Clone this project and build the executable binary.

    $ git clone https://github.com/cnrancher/cce-operator.git && cd cce-operator
    $ go generate
    $ go build .
  4. Apply the CRD config file.

    $ kubectl apply -f ./charts/cce-operator-crd/templates/crds.yaml
  5. Run the operator and then apply the example configs to create/import cluster.

    $ ./cce-operator --debug

    Modify the YAML configs in examples manually such as huaweiCredentialSecret, regionID, hostNetwork, nodeTemplate.sshKey etc.

    Launch another terminal for applying the YAML config files.

    $ kubectl apply -f ./examples/create-example.yaml

Documents

The Simplified Chinese documentation of CRD parameters is in the examples/docs directory.

Versions

The version correspondence between CCE Operator and Rancher is as follows.

cce-operator Rancher
v0.1.x N/A
v0.2.x v2.6.x
v0.3.x v2.7.x
v0.4.x v2.8.x

LICENSE

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

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.

About

Kubernetes controller for managing Huawei Cloud Container Engine (CCE) in Rancher.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages