Rancher2 deploer
Install
npm install rancher2-deployer -g
Usage
Check connect: rancher2-deployer --check --token <TOKEN> --url https://rancher/v3 --cluster <NAME CLUSTER> --project <NAME PROJECT>
Deploy: rancher2-deployer --deploy --token <TOKEN> --url https://rancher/v3 --cluster <NAME CLUSTER> --project <NAME PROJECT> --namespace <NAME NAMESPACE> --workload <NAME WORKLOAD> --container ./container.toml --config ./config.toml
Proxy: rancher2-deployer --proxy --token <TOKEN> --url https://rancher/v3 --cluster <NAME CLUSTER> --project <NAME PROJECT> --workload <NAME NAMESPACE> --path <URL PATH> --port <PORT> --rule <NAME RULE> --annotations <PATH TO FILE>
Example files
config.json:
"env": "image": "ubuntu:18.04" "imagePullPolicy": "IfNotPresent" "entrypoint": "top" "securityContext": "allowPrivilegeEscalation": false "capabilities": {} "privileged": false "procMount": "Default" "readOnlyRootFilesystem": false "runAsNonRoot": false "stdin": true "terminationMessagePath": "/dev/termination-log" "terminationMessagePolicy": "File" "tty": true
container.json:
"maxSurge": 1 "maxUnavailable": 0 "minReadySeconds": 0 "progressDeadlineSeconds": 600 "revisionHistoryLimit": 10 "strategy": "RollingUpdate"
annotations.json
"cert-manager.io/issuer": "rancher" "cert-manager.io/issuer-kind": "Issuer" "field.cattle.io/ingressState": "{}" "meta.helm.sh/release-name": "rancher" "meta.helm.sh/release-namespace": "cattle-system"