Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions ako-crd-operator/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Change log:

All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## AKO-CRD-Operator-2.1.1

### Added:
- Initial release of AKO CRD Operator for managing Avi Controller specific objects.
- Support for [HealthMonitor CRD](../docs/crds/healthmonitor.md) of type HTTP, TCP, Ping.
- Support for [ApplicationProfile CRD](../docs/crds/applicationprofile.md).
- Support for [PKIProfile CRD](../docs/crds/pkiprofile.md).
- Support for [RouteBackendExtension CRD](../docs/crds/routebackendextension.md) for advanced backend configuration.
- Support for referring [PKIProfile CRD](../docs/crds/pkiprofile.md) in [RouteBackendExtension CRD](../docs/crds/routebackendextension.md).
- Multi-tenant support with namespace-scoped resources.

148 changes: 148 additions & 0 deletions docs/ako_crd_operator.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
# AKO CRD Operator

## Overview

The AKO CRD Operator is a Kubernetes operator that manages Avi Load Balancer objects directly through Custom Resource Definitions (CRDs). Unlike AKO which translates Kubernetes resources (Ingress, Services, Gateway API) into Avi objects, the AKO CRD Operator provides direct lifecycle management of specific Avi Controller objects, enabling fine-grained control over load balancer configurations.

The operator watches for CRD objects in Kubernetes namespaces and synchronizes them with corresponding objects on the Avi Controller, providing declarative management of Avi resources through Kubernetes-native workflows.

## Key Features

- **Direct Avi Object Management**: Create and manage Avi Controller objects directly from Kubernetes
- **Declarative Configuration**: Use Kubernetes CRDs to define Avi resources
- **Status Tracking**: Real-time status updates with Kubernetes Conditions API
- **Multi-Tenancy**: Namespace-scoped resources with tenant isolation

## Supported CRDs

The AKO CRD Operator manages the following Custom Resource Definitions:

### 1. HealthMonitor

Configure health monitoring for backend services with support for:
- TCP Health Monitors
- PING Health Monitors
- HTTP Health Monitors

[HealthMonitor Documentation](crds/healthmonitor.md)

### 2. ApplicationProfile

Define application profiles corresponding to Avi with support for type
- HTTP

[ApplicationProfile Documentation](crds/applicationprofile.md)

### 3. PKIProfile

Manage PKI profiles for certificate validation:
- Configure trusted Certificate Authorities (Root and Intermediate)
- Enable secure backend communication
- Certificate validation for TLS connections

[PKIProfile Documentation](crds/pkiprofile.md)

### 4. RouteBackendExtension

Configure advanced backend settings.

[RouteBackendExtension Documentation](crds/routebackendextension.md)

## Installation and Configuration

### Using Helm

The AKO CRD Operator is bundled with AKO as a dependency and can be installed with AKO. It can be configured via values.yaml provided with AKO. For more information, see the [AKO Installation Guide](install/helm.md).

## Status and Conditions

The AKO CRD Operator updates the status of each CRD object with detailed information:

### Status Fields

- **UUID**: Unique identifier of the object on Avi Controller
- **ObservedGeneration**: Generation of the spec that was last processed
- **LastUpdated**: Timestamp of the last update
- **BackendObjectName**: Name of the object on Avi Controller
- **Tenant**: Avi tenant where the object is created
- **Controller**: Set to "ako-crd-operator"
- **Conditions**: List of status conditions using Kubernetes Conditions API
- **type**: Condition type (e.g., "Programmed")
- **status**: Condition status ("True" or "False")
- **reason**: Reason for the condition (e.g., Created, Updated, CreationFailed, UpdateFailed, DeletionFailed)
- **message**: Human-readable message describing the condition
- **lastTransitionTime**: Timestamp when the condition last changed

Example status:

```yaml
status:
uuid: "healthmonitor-12345-abcde"
observedGeneration: 1
lastUpdated: "2025-01-15T10:30:00Z"
backendObjectName: "my-k8s-cluster--default-http-health-check"
tenant: "admin"
controller: "ako-crd-operator"
conditions:
- type: Programmed
status: "True"
reason: Created
message: "HealthMonitor successfully created on Avi Controller"
lastTransitionTime: "2025-01-15T10:30:00Z"
```

## Monitoring and Troubleshooting

### Health Checks

The operator exposes health endpoints:

- **Liveness**: `http://localhost:8081/healthz`
- **Readiness**: `http://localhost:8081/readyz`

### Logs

View operator logs:

```bash
kubectl logs -n avi-system deployment/ako-crd-operator -f
```

### Events

Check Kubernetes events for CRD objects:

```bash
kubectl describe healthmonitor <name> -n <namespace>
kubectl get events -n <namespace> --field-selector involvedObject.name=<name>
```

## Upgrade

AKO CRD Operator is a dependency of AKO and can be upgraded when upgrading AKO.

## Uninstallation

To uninstall the AKO CRD Operator you need to uninstall AKO:

```bash
# Delete all CRD objects first
kubectl delete healthmonitors --all -A
kubectl delete applicationprofiles --all -A
kubectl delete pkiprofiles --all -A
```
Continue with normal AKO uninstallation.

**Note**: Deleting CRD objects will also delete the corresponding objects from Avi Controller.

## Version Compatibility

| AKO Version (includes AKO CRD Operator) | Avi Controller Version | Kubernetes Version | OpenShift Version |
|-----------------------------------------|------------------------|-------------------|-------------------|
| 2.1.1 | 30.1.1+ | 1.29 - 1.34 | 4.16 - 4.18 |

**Note**: AKO CRD Operator is bundled with AKO and shares the same version number.

## Changelog

See [CHANGELOG.md](../ako-crd-operator/CHANGELOG.md) for version history and release notes.
19 changes: 14 additions & 5 deletions docs/crds/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,21 @@ AKO categorizes the CRDs in the following buckets:

1. __Layer 7__: These CRD objects are used to express layer 7 traffic routing rules. Following are the list of CRDs currently available:

* [HostRule](https://github.com/vmware/load-balancer-and-ingress-services-for-kubernetes/blob/master/docs/crds/hostrule.md)
* [HTTPRule](https://github.com/vmware/load-balancer-and-ingress-services-for-kubernetes/blob/master/docs/crds/httprule.md)

* [HostRule](hostrule.md)
* [HTTPRule](httprule.md)
* [L7Rule](l7rule.md)
* [SSORule](ssorule.md)

2. __Layer 4__: These CRD objects are used to express layer 4 trafffic routing rules.
* [L4Rule] (https://github.com/vmware/load-balancer-and-ingress-services-for-kubernetes/blob/master/docs/crds/l4rule.md)
* [L4Rule](l4rule.md)

3. __Infrastructure__: These CRD objects are used to control Avi's infrastructure components like Ingress Class, SE group properties etc.

* [AviInfraSetting](https://github.com/vmware/load-balancer-and-ingress-services-for-kubernetes/blob/master/docs/crds/avinfrasetting.md)
* [AviInfraSetting](avinfrasetting.md)

4. __AKO CRD Operator__: These CRD objects are managed by the AKO CRD Operator:

* [HealthMonitor](healthmonitor.md) - Configure TCP, PING, and HTTP health monitors directly on Avi.
* [ApplicationProfile](applicationprofile.md) - Configure application profiles directly on Avi.
* [PKIProfile](pkiprofile.md) - Configure PKI profiles directly on Avi.
* [RouteBackendExtension](routebackendextension.md) - Configure backend properties like load balancing algorithms, persistence, health monitors, PKIProfile, etc.
Loading