Skip to content

About

No description, website, or topics provided.

Resources

Code of conduct

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Provider UpCloud

provider-upcloud is a Crossplane provider for UpCloud, built with Upjet and backed by the UpCloudLtd/upcloud Terraform provider. It is maintained jointly by UpCloud and Upbound in the crossplane-contrib organization.

It exposes XRM-conformant managed resources for every resource of the Terraform provider: servers, server groups, firewall rules and rulesets, tags, storage with backups and templates, file storage with shares and ACLs, networks, routers, network peerings, floating IPs, gateways with VPN connections and tunnels, load balancers with backends, frontends, rules, resolvers and certificate bundles, managed databases with users, logical databases and connection pools, managed object storage with users, policies, buckets, custom domains and static sites, and the UpCloud Kubernetes Service. Every resource is available in two flavors: cluster-scoped (*.upcloud.com) and namespaced (*.m.upcloud.com).

Authentication

The provider authenticates with an UpCloud API token (recommended) or an API username and password read from the referenced Secret. Create a token in the UpCloud Hub. More information available in documentation: How to create and use UpCloud API Tokens. Store the token as JSON:

{
  "token": "ucat_..."
}

or, for a username and password pair:

{
  "username": "<UpCloud API username>",
  "password": "<UpCloud API password>"
}

The optional client settings of the upstream Terraform provider are ProviderConfig fields; see ProviderConfig fields.

Getting Started

1. Install the provider

apiVersion: pkg.crossplane.io/v1
kind: Provider
metadata:
  name: provider-upcloud
spec:
  package: xpkg.crossplane.io/crossplane-contrib/provider-upcloud:v1.0.0

2. Create a credentials Secret

apiVersion: v1
kind: Secret
metadata:
  name: upcloud-creds
  namespace: crossplane-system
type: Opaque
stringData:
  creds: |
    {
      "token": "ucat_..."
    }

3. Create a ProviderConfig

apiVersion: provider.upcloud.com/v1beta1
kind: ProviderConfig
metadata:
  name: default
spec:
  credentials:
    source: Secret
    secretRef:
      name: upcloud-creds
      namespace: crossplane-system
      key: creds

Namespaced managed resources reference a ClusterProviderConfig (or a namespaced ProviderConfig) in the provider.m.upcloud.com group instead; see examples/namespaced/providerconfig/.

4. Create a managed resource

Examples for each resource are available under examples/cluster/ and examples/namespaced/.

ProviderConfig fields

Field Required Description
spec.credentials.source Yes One of Secret, InjectedIdentity, Environment, Filesystem
spec.credentials.secretRef When source=Secret Reference to the credentials Secret
spec.reconciliationPolicy No Rate-limiting policy for reconciliation
spec.requestTimeoutSec No Seconds to wait for an UpCloud API request to complete (default 120)
spec.retryMax No Maximum number of retries of a failed UpCloud API request (default 4)
spec.retryWaitMinSec No Minimum seconds to wait between retries (default 1)
spec.retryWaitMaxSec No Maximum seconds to wait between retries (default 30)

The client settings bound how long a reconcile can wait on the UpCloud API. Unset fields keep the upstream Terraform provider defaults:

apiVersion: provider.upcloud.com/v1beta1
kind: ProviderConfig
metadata:
  name: default
spec:
  credentials:
    source: Secret
    secretRef:
      name: upcloud-creds
      namespace: crossplane-system
      key: creds
  requestTimeoutSec: 30
  retryMax: 2
  retryWaitMinSec: 1
  retryWaitMaxSec: 30

Developing

Code generation

make generate

This runs the Upjet code generator against the pinned UpCloudLtd/upcloud Terraform provider schema and docs, and writes the generated APIs, controllers, and CRDs for both the cluster-scoped and namespaced variants.

Run locally against a cluster

make run

Run end-to-end tests

UPTEST_EXAMPLE_LIST="examples/cluster/storage/v1alpha1/storage.yaml" \
UPTEST_CLOUD_CREDENTIALS='{"token": "ucat_..."}' \
make e2e

See AGENTS.md for the repository layout and the full development workflow.

Reporting issues

Please open an issue for bug reports, feature requests, or questions.

About

No description, website, or topics provided.

Resources

Code of conduct

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages