Git Product home page Git Product logo

load-balancer-operator-for-kubernetes's Introduction

Load Balancer Operator for Kubernetes

codecov Load Balancer Operator for Kubernetes Checks

Overview

Load Balancer Operator for Kubernetes is a Cluster API speaking operator for load balancers. It manages the lifecycle of load balancers implementations and provides a cluster control plane high availability interface in the multi-cluster scenario.

Features

  1. It reconciles Cluster API objects and provisions Service type LoadBalancer for control plane Machines to achieve HA.
  2. It leverages Carvel Packaging APIs to lifecycle manage load balancer provider operator. Currently, we now support VMware's NSX Advanced Load Balancer Kubernetes Operator as a reference implementation.
  3. It bridges Cluster API and load balancer provider operator to ensure load balancer resources are cleaned up when cluster is deleted.
  4. For the NSX Advanced Load Balancer operator, it also automates the user account creation and injection per cluster.

Contributing

We welcome new contributors to our repository. Following are the pre-requisties that should help you get started:

  • Before contributing, please get familiar with our Code of Conduct.
  • Check out our Contributor Guide for information about setting up your development environment and our contribution workflow.

License

Load Balancer Operator for Kubernetes is licensed under the Apache License, version 2.0

load-balancer-operator-for-kubernetes's People

Contributors

chenlin07 avatar christianang avatar dependabot[bot] avatar flawedmatrix avatar gwang550 avatar hanfa avatar ixinqi avatar larry-x-yu avatar lubronzhan avatar nicolehanjing avatar sbhatp avatar sunjaybhatia avatar xudongliuharold avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

load-balancer-operator-for-kubernetes's Issues

High Availability of AKO

Describe the feature request

AKODeploymentConfig doesn't allow a user to configure the replica count, which is useful for high availablity.

Proposal is to add replicaCount to AKODeploymentConfig's ExtraConfigs struct, which will set the loadBalancerAndIngressService.config.replica_count field.

AKODeploymentConfig example:

apiVersion: networking.tkg.tanzu.vmware.com/v1alpha1
kind: AKODeploymentConfig
metadata:
  name: my-ako-deployment-config
spec:
  ...
  extraConfigs:
    replicaCount: 2
  ...

which creates the following load-balancer-and-ingress-service-data-values secret:

loadBalancerAndIngressService:
    name: ako-tkg-system-tkg-mgmt-vc
    namespace: avi-system
    config:
        ...
        replica_count: 2
        ...

Describe alternatives you've considered

None

Affected product area (please put an X in all that apply)

  • Docs
  • Installation
  • Plugin
  • Security
  • Test and Release
  • User Experience

Additional context

Documentation about HA AKO: https://docs.vmware.com/en/VMware-NSX-Advanced-Load-Balancer/1.11/Avi-Kubernetes-Operator-Guide/GUID-90CFB939-8D47-44EF-856B-DDD9F2677B41.html?hWord=N4IghgNiBcIBYEsDmcAEYBuYETAIxwQBcBPEAXyA

Fix markdownlint github action

Bug description
it failed when running linting
https://github.com/vmware-tanzu/load-balancer-operator-for-kubernetes/actions/runs/8244213459/job/22546053852?pr=180

Run make lint-markdown
markdownlint -c md-config.json .
/opt/hostedtoolcache/node/14.21.3/x64/lib/node_modules/markdownlint-cli/node_modules/markdownlint/lib/md056.js:22
        expectedCount ||= actualCount;
                      ^^^

SyntaxError: Unexpected token '||='
    at wrapSafe (internal/modules/cjs/loader.js:1029:16)
    at Module._compile (internal/modules/cjs/loader.js:1078:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1143:10)
    at Module.load (internal/modules/cjs/loader.js:979:32)
    at Function.Module._load (internal/modules/cjs/loader.js:819:12)
    at Module.require (internal/modules/cjs/loader.js:1003:19)
    at require (internal/modules/cjs/helpers.js:107:18)
    at Object.<anonymous> (/opt/hostedtoolcache/node/14.21.3/x64/lib/node_modules/markdownlint-cli/node_modules/markdownlint/lib/rules.js:58:3)
    at Module._compile (internal/modules/cjs/loader.js:1114:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1143:10)
make: *** [Makefile:181: lint-markdown] Error 1
Error: Process completed with exit code 2.
0s
0s
0s

Maybe switching to v2 will fix it https://github.com/DavidAnson/markdownlint-cli2/blob/main/README.md
Affected product area (please put an X in all that apply)

  • Docs
  • Installation
  • Plugin
  • Security
  • Test and Release
  • User Experience

Expected behavior
Test passed
Steps to reproduce the bug

Version (include the SHA if the version is not obvious)

Environment where the bug was observed (cloud, OS, etc)

Relevant Debug Output (Logs, manifests, etc)

Nondeterminism observed in retrieving ADKDeploymentConfigList

Bug description

When the controller reconciles against a Cluster label, the logic here is to list all available AKODeploymentConfig and choose the first one whose selector matches the Cluster.

However, we cannot guarantee the list order of ADC, so what if two or more ADCs have the matching selector. This brings non-deterministic reconcile logic.

Affected product area (please put an X in all that apply)

  • Docs
  • Installation
  • Plugin
  • Security
  • Test and Release
  • User Experience

Expected behavior
Have a documented and fixed order of applying ADC.

Steps to reproduce the bug

Version (include the SHA if the version is not obvious)
1.5.0

Environment where the bug was observed (cloud, OS, etc)

Relevant Debug Output (Logs, manifests, etc)

AKOO should check if ControlPlaneEndpoint is FQDN before setting to HA service

Bug description
In AKOO 1.9 It's not checking whether the cluster.Spec.ControlPlaneEndpoint.Host is FQDN or not, before updating the service's loadbalancerIP here, that's why this is failing. It only checks here 

So it sets FQDN as service.spec.loadbalancerIP, then AKO will have issue with it and can't update the backend server pool

2024-01-09T13:16:20.669Z WARN rest/dequeue_nodes.go:806 key: admin/tkg-system-mgmt--tkg-system-tkg-system-mgmt-control-plane, msg: problem in processing request for: VsVip
2024-01-09T13:16:20.669Z INFO rest/dequeue_nodes.go:807 key: admin/tkg-system-mgmt--tkg-system-tkg-system-mgmt-control-plane, msg: error str: Encountered an error on PUT request to URL https://10.97.48.5//api/vsvip/vsvip-3628bde3-2707-4974-9a1c-f908aec5b209: HTTP code: 400; error from Avi: map[error:tkg-system-mgmt--tkg-system-tkg-system-mgmt-control-plane has invalid virtual ipv4 address mgmt.tanzu.bitc.int.tele2.com]

Affected product area (please put an X in all that apply)

  • Docs
  • Installation
  • Plugin
  • Security
  • Test and Release
  • User Experience

Expected behavior

Steps to reproduce the bug

Version (include the SHA if the version is not obvious)

Environment where the bug was observed (cloud, OS, etc)

Relevant Debug Output (Logs, manifests, etc)

Header check fails

Bug description

Header files doesn't pass the header check when running make test.

Affected product area (please put an X in all that apply)

  • Docs
  • Installation
  • Plugin
  • Security
  • Test and Release
  • User Experience

Expected behavior

The binary can be compiled and test can run successfully.

Steps to reproduce the bug

Version (include the SHA if the version is not obvious)
1.5.0

Environment where the bug was observed (cloud, OS, etc)
golang 1.16.11 & 1.17

Relevant Debug Output (Logs, manifests, etc)

❯ make test
hack/tools/bin/controller-gen object:headerFile="hack/boilerplate.go.txt" paths="./..."
./hack/header-check.sh
Header check: Makefile... OK
Header check: api/v1alpha1/akodeploymentconfig_types.go... OK
Header check: api/v1alpha1/constants.go... OK
Header check: api/v1alpha1/groupversion_info.go... OK
Header check: api/v1alpha1/zz_generated.deepcopy.go... FAIL
Header check: controllers/akodeploymentconfig/akodeploymentconfig_controller.go... OK
Header check: controllers/akodeploymentconfig/akodeploymentconfig_controller_avi_phase.go... OK
Header check: controllers/akodeploymentconfig/akodeploymentconfig_controller_cluster_phase.go... OK
Header check: controllers/akodeploymentconfig/akodeploymentconfig_controller_intg_test.go... OK
Header check: controllers/akodeploymentconfig/akodeploymentconfig_controller_unit_test.go... OK
Header check: controllers/akodeploymentconfig/cluster/cluster_controller.go... OK
Header check: controllers/akodeploymentconfig/cluster/cluster_controller_addon_secret.go... OK
Header check: controllers/akodeploymentconfig/cluster/cluster_controller_unit_test.go... OK
Header check: controllers/akodeploymentconfig/cluster/suite_test.go... OK
Header check: controllers/akodeploymentconfig/phases/phases.go... OK
Header check: controllers/akodeploymentconfig/phases/phases_unit_test.go... OK
Header check: controllers/akodeploymentconfig/phases/suite_test.go... OK
Header check: controllers/akodeploymentconfig/suite_test.go... OK
Header check: controllers/akodeploymentconfig/user/ako_role.go... OK
Header check: controllers/akodeploymentconfig/user/suite_test.go... OK
Header check: controllers/akodeploymentconfig/user/user_controller.go... OK
Header check: controllers/akodeploymentconfig/user/user_controller_test.go... OK
Header check: controllers/cluster/cluster_controller.go... OK
Header check: controllers/cluster/cluster_intg_test.go... OK
Header check: controllers/cluster/suite_test.go... OK
Header check: controllers/configmap/configmap_controller.go... OK
Header check: controllers/configmap/configmap_intg_test.go... OK
Header check: controllers/configmap/suite_test.go... OK
Header check: controllers/controllers.go... OK
Header check: controllers/machine/machine_controller.go... OK
Header check: controllers/machine/machine_controller_intg_test.go... OK
Header check: controllers/machine/suite_test.go... OK
Header check: e2e/doc.go... OK
Header check: e2e/e2e_test.go... OK
Header check: e2e/pkg/env/assertions.go... OK
Header check: e2e/pkg/env/avi.go... OK
Header check: e2e/pkg/env/env.go... OK
Header check: e2e/pkg/env/io.go... OK
Header check: e2e/pkg/env/kubectl.go... OK
Header check: e2e/pkg/env/kubectl_test.go... OK
Header check: e2e/pkg/env/suite_test.go... OK
Header check: e2e/pkg/env/tkg.go... OK
Header check: e2e/pkg/env/vip.go... OK
Header check: e2e/suite_test.go... OK
Header check: hack/e2e.sh... OK
Header check: hack/gobuild/build.sh... OK
Header check: hack/gobuild/install_docker.sh... OK
Header check: hack/gobuild/manifests.sh... OK
Header check: hack/gobuild/publish.sh... OK
Header check: hack/header-check.sh... OK
Header check: hack/run-e2e.sh... OK
Header check: hack/test-e2e.sh... OK
Header check: hack/test-ytt.sh... OK
Header check: hack/tools/Makefile... OK
Header check: hack/tools/tools.go... OK
Header check: hack/update-containerd.sh... OK
Header check: main.go... OK
Header check: pkg/ako-operator/config_envvar.go... OK
Header check: pkg/ako/ako.go... OK
Header check: pkg/ako/ako_test.go... OK
Header check: pkg/ako/suite_test.go... OK
Header check: pkg/ako/values.go... OK
Header check: pkg/ako/values_test.go... OK
Header check: pkg/aviclient/client.go... OK
Header check: pkg/aviclient/fake_avi_client.go... OK
Header check: pkg/aviclient/interface.go... OK
Header check: pkg/controller-runtime/finalizer.go... OK
Header check: pkg/controller-runtime/handlers/cluster.go... OK
Header check: pkg/controller-runtime/handlers/cluster_for_akodeploymentconfig_handler.go... OK
Header check: pkg/controller-runtime/handlers/cluster_for_akodeploymentconfig_handler_test.go... OK
Header check: pkg/controller-runtime/handlers/cluster_for_machine_handler.go... OK
Header check: pkg/controller-runtime/handlers/cluster_for_machine_handler_test.go... OK
Header check: pkg/controller-runtime/handlers/service_for_cluster_handler.go... OK
Header check: pkg/controller-runtime/handlers/suite_test.go... OK
Header check: pkg/haprovider/haprovider.go... OK
Header check: pkg/netprovider/network_provider.go... OK
Header check: pkg/test/builder/flags.go... OK
Header check: pkg/test/builder/intg_test_context.go... OK
Header check: pkg/test/builder/test_suite.go... OK
Header check: pkg/test/util/utils.go... OK
Header check: pkg/utils/password_generator.go... OK
Header check: pkg/utils/password_generator_test.go... OK
Header check: pkg/utils/utils_suite_test.go... OK
make: *** [header-check] Error 1

[Ignore] Dummy issues for testing bots

Bug description

Affected product area (please put an X in all that apply)

  • Docs
  • Installation
  • Plugin
  • Security
  • Test and Release
  • User Experience

Expected behavior

Steps to reproduce the bug

Version (include the SHA if the version is not obvious)

Environment where the bug was observed (cloud, OS, etc)

Relevant Debug Output (Logs, manifests, etc)

Pin to newer controller-runtime once it starts to release envtest binaries

(This is used to request new product features)

Describe the feature request
setup-envtest today downloads archives with envtest binaries from the kubebuilder GCS bucket. Given kubernetes/k8s.io#2647 we have to ASAP move away from this.

kubernetes-sigs/controller-runtime#2811

Describe alternatives you've considered

Affected product area (please put an X in all that apply)

  • Docs
  • Installation
  • Plugin
  • Security
  • Test and Release
  • User Experience

Additional context

Need better logging for ako-operator

(This is used to request new product features)

Describe the feature request

  1. More concise error output
  2. More readable timestamp
  3. Less scrambled json

Describe alternatives you've considered

Affected product area (please put an X in all that apply)

  • Docs
  • Installation
  • Plugin
  • Security
  • Test and Release
  • User Experience

Additional context

Add more validation functionality in akodeploymentconfig webhook

(This is used to request new product features)

Describe the feature request

  • In PR: #94, we add validation functionality in most of the AKODeploymentConfig fields, but there are several that still can be improved.
    • check spec.controllerVersion format is valid or not
    • check AVI certificate secret value is valid or not
    • when deleting the AKODeploymentConfig object, do not allow deleting management cluster akodeploymentconfig, do now allow deleting akodeploymentconfig object when there are clusters selected by this akodeploymentconfig object.

Describe alternatives you've considered

Affected product area (please put an X in all that apply)

  • Docs
  • Installation
  • Plugin
  • Security
  • Test and Release
  • User Experience

Additional context

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.