releaser-api

module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 6, 2026 License: Apache-2.0

README

releaser-api

Public Kubernetes API types and generated clients for Releaser.

This repository is the versioned API contract shared by Releaser controllers, gateways, platform integrations, CLIs, and external automation. Runtime controllers and delivery behavior remain in the main releaser repository.

Packages

  • api/: core.releaser.io/v1alpha1 and workflow.releaser.io/v1alpha1 API types, constants, and scheme registration;
  • pkg/clientset/: generated typed and fake Kubernetes clients;
  • pkg/informers/: generated shared informer factories;
  • pkg/listers/: generated cache-backed typed listers;
  • pkg/applyconfiguration/: generated server-side apply builders;
  • config/crd/: generated CRD release artifacts.

All public APIs are currently v1alpha1. Minor releases may evolve alpha API fields; consumers should pin a tagged module version.

Install

go get github.com/ReleaseDock/releaser-api@v0.1.0

Typed client example

package main

import (
	"context"
	"log"

	versioned "github.com/ReleaseDock/releaser-api/pkg/clientset/versioned"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/client-go/rest"
)

func main() {
	config, err := rest.InClusterConfig()
	if err != nil {
		log.Fatal(err)
	}

	client, err := versioned.NewForConfig(config)
	if err != nil {
		log.Fatal(err)
	}

	applications, err := client.CoreV1alpha1().Applications("default").List(
		context.Background(),
		metav1.ListOptions{},
	)
	if err != nil {
		log.Fatal(err)
	}

	log.Printf("found %d applications", len(applications.Items))
}

For read-heavy services, use the generated shared informer factory and listers instead of issuing a Kubernetes API request for every read.

Development

Requirements:

  • Go 1.25;
  • access to a Kubernetes cluster for integration tests;
  • the Releaser CRDs installed in that cluster.
make generate          # regenerate clients, informers, listers, apply types, and CRDs
make test              # unit tests
make test-race         # race-enabled unit tests
make vet               # static checks
make vuln              # reachable vulnerability scan
make verify            # generation consistency, tests, and vet
make test-integration  # real Kubernetes client and informer test

The integration test uses the current kubeconfig, creates a uniquely named temporary namespace, exercises all eight public CRD clients and informers, and deletes the namespace during cleanup. It has been verified against a local kind cluster running Kubernetes v1.28.0.

Versioning

Releases use semantic-version tags such as v0.1.0. Go consumers should use a tag rather than a branch or local replace directive.

License

Apache License 2.0. See LICENSE.

Directories

Path Synopsis
api
core/v1alpha1
Package v1alpha1 defines the core Releaser API resources and their stable Kubernetes metadata contract.
Package v1alpha1 defines the core Releaser API resources and their stable Kubernetes metadata contract.
workflow/v1alpha1
Package v1alpha1 defines Releaser workflow and progressive delivery API resources together with their stable protocol values.
Package v1alpha1 defines Releaser workflow and progressive delivery API resources together with their stable protocol values.
pkg
clientset/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
clientset/versioned/typed/core/v1alpha1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
clientset/versioned/typed/core/v1alpha1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
clientset/versioned/typed/workflow/v1alpha1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
clientset/versioned/typed/workflow/v1alpha1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL