cce-operator

command module
v0.1.0-rc10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 12, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

README

cnrancher/cce-operator

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

Usage

  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: "[secret-name]"
        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. Build the operator executable file:

    $ make generate
    $ go build .
    
  4. Apply the CRD:

    $ kubectl apply -f ./charts/cce-operator-crd/templates/crds.yaml
    
  5. Run the operator and create/import CCE cluster:

    $ ./cce-operator --debug
    

    Modify the CredentialSecret, hostNetwork, sshKey and other configurations in examples/create-example.yaml and examples/import-example.yaml.

    Launch another terminal for applying the yaml config files:

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

License

Copyright 2023 Rancher Labs, Inc.

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.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg
apis/cce.pandaria.io/v1
+k8s:deepcopy-gen=package +groupName=cce.pandaria.io
+k8s:deepcopy-gen=package +groupName=cce.pandaria.io

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL