kestra-io / kestra-io/plugin-ovhcloud

[plugin-ovhcloud] Networking — Load Balancer, vRack, Floating IPs, and DNS

Open
#5 0 comments 0 reactions 0 assignees View on GitHub
area/plugin
Dominant language
Java
Stars
0
Forks
0
Avg merge
18h 6m
Merged PRs (30d)
1

Description

## Summary

Implement the `networking` sub-plugin for `plugin-ovhcloud`, enabling Kestra users to manage OVHcloud networking resources as part of automated infrastructure flows: IP Load Balancer services (frontends, backends, routes), vRack private networks (linking cloud projects and bare metal), Floating IPs, and DNS zone records. Infrastructure and SRE teams can use this plugin to automate blue/green deployments, IPAM workflows, and DNS record management.

## Motivation

Networking changes — DNS record updates, load balancer rule modifications, vRack attachment — are high-risk operations that benefit enormously from orchestration: sequential execution, conditional logic, rollback on failure, and audit trails. Today these are done via CLI or manual API calls. A Kestra plugin makes them reproducible and embeddable in larger infrastructure pipelines.

## Context

Part of the OVHcloud plugin EPIC: https://github.com/kestra-io/plugin-ovhcloud/issues/2.
Reference implementation: `plugin-gcp` (Cloud DNS tasks, Load Balancer) and `plugin-ee-netbox` (DNS/IP management patterns). The shared `OvhConnection` base class handles HMAC auth across all networking tasks.

## API Reference

- **Official docs (Load Balancer)**: https://eu.api.ovh.com/console/?section=%2FipLoadbalancing&branch=v1
- **Official docs (vRack)**: https://eu.api.ovh.com/console/?section=%2Fvrack&branch=v1
- **Official docs (DNS)**: https://eu.api.ovh.com/console/?section=%2Fdomain&branch=v1
- **Floating IPs guide**: https://help.ovhcloud.com/csm/en-public-cloud-network-attach-floating-ip-to-instance
- **Authentication**: OVH 3-key HMAC for all endpoints
- **Base URL**: `https://eu.api.ovh.com/1.0/`

## Gradle Dependencies

Add to `build.gradle`:

```groovy
// OVH management plane
implementation 'net.minidev:ovh-java-sdk-core:1.0.17'
implementation 'net.minidev:ovh-java-sdk-ipLoadbalancing:1.0.17'
implementation 'net.minidev:ovh-java-sdk-vrack:1.0.17'
implementation 'net.minidev:ovh-java-sdk-ip:1.0.17'
implementation 'net.minidev:ovh-java-sdk-domain:1.0.17'
```

> Use the latest stable version available on Maven Central.

## Plugin Structure

- **Repository**: `plugin-ovhcloud`
- **Namespace**: `io.kestra.plugin.ovhcloud`
- **Sub-plugins**: `networking.loadbalancer`, `networking.vrack`, `networking.floatingip`, `networking.dns`

## Suggested Tasks

1. **`networking.loadbalancer`** — `ListServices`, `GetService`; `CreateFarm`, `CreateServer`, `CreateFrontend`, `CreateRoute`; `RefreshConfig`
2. **`networking.vrack`** — `List`, `Get`, `AttachCloudProject`, `DetachCloudProject`, `AttachIpBlock`
3. **`networking.floatingip`** — `List`, `Create` (creates and attaches to instance), `Delete`
4. **`networking.dns`** — `ListZones`, `ListRecords`, `CreateRecord`, `UpdateRecord`, `DeleteRecord`, `RefreshZone`
5. Add polling trigger `networking.loadbalancer.FarmServerStateTrigger` (watches backend server health state)
6. Write unit + integration tests
7. Add `package-info.java` with `@PluginSubGroup(category = PluginSubGroup.PluginCategory.CLOUD)`
8. Add YAML examples and plugin documentation

## YAML Examples

### Example 1 — Create a DNS A record and refresh the zone

```yaml
id: update_dns_record
namespace: company.team

inputs:
- id: zone
type: STRING
- id: ip_address
type: STRING

tasks:
- id: create_record
type: io.kestra.plugin.ovhcloud.networking.dns.CreateRecord
endpoint: "{{ secret('OVH_ENDPOINT') }}"
applicationKey: "{{ secret('OVH_APP_KEY') }}"
applicationSecret: "{{ secret('OVH_APP_SECRET') }}"
consumerKey: "{{ secret('OVH_CONSUMER_KEY') }}"
zone: "{{ inputs.zone }}"
fieldType: A
subDomain: "api"
target: "{{ inputs.ip_address }}"
ttl: 300

- id: refresh_zone
type: io.kestra.plugin.ovhcloud.networking.dns.RefreshZone
endpoint: "{{ secret('OVH_ENDPOINT') }}"
applicationKey: "{{ secret('OVH_APP_KEY') }}"
applicationSecret: "{{ secret('OVH_APP_SECRET') }}"
consumerKey: "{{ secret('OVH_CONSUMER_KEY') }}"
zone: "{{ inputs.zone }}"
```

### Example 2 — Attach a cloud project to vRack for private networking

```yaml
id: setup_vrack
namespace: company.team

tasks:
- id: attach_project
type: io.kestra.plugin.ovhcloud.networking.vrack.AttachCloudProject
endpoint: "{{ secret('OVH_ENDPOINT') }}"
applicationKey: "{{ secret('OVH_APP_KEY') }}"
applicationSecret: "{{ secret('OVH_APP_SECRET') }}"
consumerKey: "{{ secret('OVH_CONSUMER_KEY') }}"
vrackId: "{{ secret('VRACK_ID') }}"
projectId: "{{ secret('OVH_PROJECT_ID') }}"

- id: log
type: io.kestra.plugin.core.log.Log
message: "Project {{ secret('OVH_PROJECT_ID') }} attached to vRack"
```

### Example 3 — React when a load balancer backend server goes DOWN

```yaml
id: on_lb_server_down
namespace: company.team

triggers:
- id: watch_farm_servers
type: io.kestra.plugin.ovhcloud.networking.loadbalancer.FarmServerStateTrigger
endpoint: "{{ secret('OVH_ENDPOINT') }}"
applicationKey: "{{ secret('OVH_APP_KEY') }}"
applicationSecret: "{{ secret('OVH_APP_SECRET') }}"
consumerKey: "{{ secret('OVH_CONSUMER_KEY') }}"
serviceName: "{{ secret('LB_SERVICE_NAME') }}"
farmId: "{{ secret('FARM_ID') }}"
targetStatus: DOWN
interval: PT1M

tasks:
- id: alert
type: io.kestra.plugin.core.log.Log
message: "Server {{ trigger.serverId }} is DOWN on farm {{ trigger.farmId }}"
```

## Acceptance Criteria

- [ ] Load Balancer farm, server, frontend, route CRUD tasks + `RefreshConfig`
- [ ] vRack `List`, `AttachCloudProject`, `DetachCloudProject`, `AttachIpBlock` tasks
- [ ] Floating IP `List`, `Create` (with instance attachment), `Delete` tasks
- [ ] DNS `ListRecords`, `CreateRecord`, `UpdateRecord`, `DeleteRecord`, `RefreshZone` tasks
- [ ] At least one polling trigger (`FarmServerStateTrigger`)
- [ ] All `Property` fields support Kestra expression language
- [ ] Unit + integration tests pass (`./gradlew test`)
- [ ] `package-info.java` with `@PluginSubGroup`
- [ ] Build passes with `./gradlew build`

---

## Repository Setup Checklist

> The repository is shared with other sub-plugins — scaffold once from the EPIC (https://github.com/kestra-io/plugin-ovhcloud/issues/2). Skip if already done.

### 1. Scaffold the repository

Create the repository using the Kestra plugin scaffold tool:
https://github.com/kestra-io/plugins-devtools#kestra-plugin-scaffold

### 2. Add to Sanity check page

Add this plugin to the [Sanity check Notion page](https://www.notion.so/kestra-io/32736907f7b580cbb00dc7c061e624b1?v=32736907f7b58002ac2b000ccc63d8a2).

### 3. Run scoped Terraform apply

Run the following from `infra/terraform/github`:

```bash
terraform apply \
-target='github_repository.repo["plugin-ovhcloud"]' \
-target='github_issue_labels.plugins["plugin-ovhcloud"]' \
-target='github_repository_ruleset.branch["plugin-ovhcloud"]'
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with EPIC #2 and the repository scaffold checklist, then compare plugin-gcp and plugin-ee-netbox for task and DNS/IP management patterns. Review the build.gradle dependencies and the networking sub-plugin structure before implementing the listed Load Balancer, vRack, Floating IP, DNS, and trigger work. Done means the acceptance checklist passes, including unit and integration tests, documentation examples, and ./gradlew build.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, terraform
Domain
backend-api-design, cloud, networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.