patchxr

package
v0.0.0-...-c78a5de Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package patchxr implements the command for patching a Crossplane XR (Composite Resource).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddConnectionSecret

func AddConnectionSecret(xr *unstructured.Unstructured, connectionSecretName, connectionSecretNamespace string) error

AddConnectionSecret adds writeConnectionSecretToRef to the XR spec based on the provided connection secret parameters.

func DefaultValuesFromXRD

func DefaultValuesFromXRD(xr map[string]any, apiVersion string, xrd apiextensionsv1.CompositeResourceDefinition) error

DefaultValuesFromXRD sets default values on the XR based on the XRD schema. Based on the `crossplane render --xrd` flag of Crossplane CLI v2 https://github.com/crossplane/crossplane/blob/v2.0.2/cmd/crank/render/xrd.go#L13-L43

func LoadXRD

LoadXRD loads an XRD from a YAML file as an unstructured object.

Types

type Cmd

type Cmd struct {
	// Arguments.
	InputFile string `` /* 143-byte string literal not displayed */

	// Output Flags.
	OutputFile string `` /* 145-byte string literal not displayed */

	// Patching Flags.
	AddConnectionSecret       bool   `` /* 218-byte string literal not displayed */
	ConnectionSecretName      string `` /* 238-byte string literal not displayed */
	ConnectionSecretNamespace string `` /* 238-byte string literal not displayed */
	XRD                       string `` /* 272-byte string literal not displayed */
	// contains filtered or unexported fields
}

Cmd arguments and flags for patching a Crossplane XR (Composite Resource).

func (*Cmd) AfterApply

func (c *Cmd) AfterApply() error

AfterApply implements kong.AfterApply.

func (*Cmd) Help

func (c *Cmd) Help() string

Help returns help message for the patch-xr command.

func (*Cmd) Run

func (c *Cmd) Run(k *kong.Context) error

Run runs the patch-xr command.

Jump to

Keyboard shortcuts

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