Skip to content

agoda-com/etcd-operator

Repository files navigation

ETCD Operator

Code Coverage

Docs

Deployment

Standard

  • config/base - cluster-wide operator deployment, does not include RBAC and CRD
  • config/crd - generated Custom Resource Definitions
  • config/rbac - cluster-wide RBAC

Profiles

  • default - default deployment
  • config/e2e - e2e rbac sandbox with coverage enabled on etcd-operator

Running locally

Bootstrap local environment

Operator requires cert-manager and CRDs to be installed in the cluster.

kustomize build --enable-helm config/bootstrap | kubectl apply -f -

Deploy (docker+kubectl)

docker build --tag ghcr.io/agoda-com/etcd .
kubectl apply -k config/default

Deploy (skaffold)

skaffold run 

Debug

skaffold debug

VSCode launch configuration:

{
    "name": "Skaffold Debug",
    "type": "go",
    "request": "attach",
    "mode": "remote",
    "host": "localhost",
    "port": 56268,
    "substitutePath": [
        {
            "from": "${workspaceFolder}",
            "to": "/workspace",
        },
    ],

Testing

Unit tests only (marked with t.Short()):

make test

Unit and integration tests:

make integration-test

End-to-end tests:

make e2e-test

Coverage:

make test coverage
make integration-test coverage
make e2e-test coverage

Output coverage report:

CODECOV_HTMLFILE=build/coverage.html make integration-test coverage
open build/coverage.html

Releases

No releases published

Packages

 
 
 

Languages