kustomizationgenerator

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

README

pkg/io/generator/kustomization

This package provides Kustomization file generators for KSail.

Purpose

Generates Kustomization files and related configuration for Kubernetes deployments. Kustomization is a Kubernetes-native configuration management solution that allows for declarative management of Kubernetes objects.

Features

  • Kustomization Files: Generates kustomization.yaml files for resource management
  • Resource Layering: Supports base and overlay patterns for environment-specific configurations
  • Patch Management: Generates patches and transformations for resources
  • GitOps Integration: Creates configurations suitable for GitOps workflows

Usage

import "github.com/devantler-tech/ksail-go/pkg/io/generator/kustomization"

// Generate Kustomization files
generator := kustomization.NewGenerator(/* configuration */)
kustomizeFiles, err := generator.Generate(/* parameters */)
if err != nil {
    log.Fatal("Failed to generate Kustomization files:", err)
}

This generator is used when KSail needs to create Kustomization configurations for managing Kubernetes resources in a declarative and composable way.


⬅️ Go Back

Documentation

Overview

Package kustomizationgenerator provides utilities for generating kustomization.yaml files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KustomizationGenerator

type KustomizationGenerator struct {
	Marshaller marshaller.Marshaller[*ktypes.Kustomization]
}

KustomizationGenerator generates a kustomization.yaml.

func NewKustomizationGenerator

func NewKustomizationGenerator() *KustomizationGenerator

NewKustomizationGenerator creates and returns a new KustomizationGenerator instance.

func (*KustomizationGenerator) Generate

func (g *KustomizationGenerator) Generate(
	kustomization *ktypes.Kustomization,
	opts yamlgenerator.Options,
) (string, error)

Generate creates a kustomization.yaml file and writes it to the specified output file path.

Jump to

Keyboard shortcuts

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