|
| 1 | +# HAProxy Cloud Controller Manager Helm Chart |
| 2 | + |
| 3 | +This Helm chart deploys the HAProxy Cloud Controller Manager (CCM) for Kubernetes. |
| 4 | + |
| 5 | +## Configuration |
| 6 | + |
| 7 | +### Basic Configuration |
| 8 | + |
| 9 | +The chart supports configuration through the `values.yaml` file. Here are the key configuration options: |
| 10 | + |
| 11 | +### Image Configuration |
| 12 | + |
| 13 | +```yaml |
| 14 | +image: |
| 15 | + name: bearsan/haproxy-ccm |
| 16 | + tag: 0.1.0 |
| 17 | + useImagePullSecret: |
| 18 | + enabled: false |
| 19 | + name: "" |
| 20 | +``` |
| 21 | +
|
| 22 | +### Environment Variables |
| 23 | +
|
| 24 | +```yaml |
| 25 | +env: |
| 26 | + useExistsSecret: |
| 27 | + enabled: false |
| 28 | + secretRef: |
| 29 | + baseUrl: |
| 30 | + name: "" |
| 31 | + key: "" |
| 32 | + auth: |
| 33 | + name: "" |
| 34 | + key: "" |
| 35 | + baseUrl: "" |
| 36 | + auth: "" |
| 37 | +``` |
| 38 | +
|
| 39 | +### Command Line Arguments |
| 40 | +
|
| 41 | +You can customize the command line arguments passed to the HAProxy CCM: |
| 42 | +
|
| 43 | +```yaml |
| 44 | +args: |
| 45 | + # Cloud provider specific arguments |
| 46 | + cloudProvider: "haproxy" |
| 47 | + |
| 48 | + # Additional custom arguments (list format) |
| 49 | + additional: [] |
| 50 | +``` |
| 51 | +
|
| 52 | +## Usage Examples |
| 53 | +
|
| 54 | +### Basic Deployment |
| 55 | +
|
| 56 | +```bash |
| 57 | +helm install haproxy-ccm ./deploy/haproxy-ccm \ |
| 58 | + --set env.baseUrl="http://haproxy:5555" \ |
| 59 | + --set env.auth="admin:password" |
| 60 | +``` |
| 61 | + |
| 62 | +### Deployment with Additional Arguments |
| 63 | + |
| 64 | +```yaml |
| 65 | +# custom-values.yaml |
| 66 | +env: |
| 67 | + baseUrl: "grpc://haproxy-manager:50051" |
| 68 | + |
| 69 | +args: |
| 70 | + additional: |
| 71 | + - "--log-level=debug" |
| 72 | + - "--bind-address=0.0.0.0" |
| 73 | + - "--port=10258" |
| 74 | + - "--haproxy-endpoint=grpc://haproxy-manager:50051" |
| 75 | +``` |
| 76 | +
|
| 77 | +```bash |
| 78 | +helm install haproxy-ccm ./deploy/haproxy-ccm -f custom-values.yaml |
| 79 | +``` |
| 80 | + |
| 81 | +### Using Existing Secrets |
| 82 | + |
| 83 | +```yaml |
| 84 | +# secret-values.yaml |
| 85 | +env: |
| 86 | + useExistsSecret: |
| 87 | + enabled: true |
| 88 | + secretRef: |
| 89 | + baseUrl: |
| 90 | + name: "haproxy-config" |
| 91 | + key: "endpoint" |
| 92 | + auth: |
| 93 | + name: "haproxy-config" |
| 94 | + key: "auth" |
| 95 | + |
| 96 | +args: |
| 97 | + additional: |
| 98 | + - "--v=4" |
| 99 | + - "--leader-elect=true" |
| 100 | +``` |
| 101 | +
|
| 102 | +```bash |
| 103 | +helm install haproxy-ccm ./deploy/haproxy-ccm -f secret-values.yaml |
| 104 | +``` |
| 105 | + |
| 106 | +## Common Additional Arguments |
| 107 | + |
| 108 | +Here are some commonly used additional arguments: |
| 109 | + |
| 110 | +- `--log-level=debug`: Set log level to debug |
| 111 | +- `--bind-address=0.0.0.0`: Bind address for the CCM server |
| 112 | +- `--port=10258`: Port for the CCM server |
| 113 | +- `--haproxy-endpoint=<endpoint>`: Override HAProxy endpoint (alternative to env var) |
| 114 | +- `--v=4`: Set verbosity level |
| 115 | +- `--leader-elect=true`: Enable leader election for HA deployments |
| 116 | +- `--cloud-config=<path>`: Path to cloud configuration file |
| 117 | +- `--allocate-node-cidrs=false`: Disable node CIDR allocation |
| 118 | +- `--configure-cloud-routes=false`: Disable cloud route configuration |
| 119 | + |
| 120 | +## Installation |
| 121 | + |
| 122 | +1. Clone the repository |
| 123 | +2. Configure your `values.yaml` or use `--set` flags |
| 124 | +3. Install the chart: |
| 125 | + |
| 126 | +```bash |
| 127 | +helm install haproxy-ccm ./deploy/haproxy-ccm |
| 128 | +``` |
| 129 | + |
| 130 | +## Upgrading |
| 131 | + |
| 132 | +```bash |
| 133 | +helm upgrade haproxy-ccm ./deploy/haproxy-ccm |
| 134 | +``` |
| 135 | + |
| 136 | +## Uninstallation |
| 137 | + |
| 138 | +```bash |
| 139 | +helm uninstall haproxy-ccm |
| 140 | +``` |
0 commit comments