k8s

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

secret.go Stores a key/value pair in a Kubernetes Secret using only the Go standard library. It reads the in-cluster service-account token and CA cert, then calls the K8s API directly.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateOrUpdateSecret

func CreateOrUpdateSecret(ctx context.Context, log *slog.Logger, namespace, applicationName, secretName, key, value string) error

Types

type Secret

type Secret struct {
	APIVersion string            `json:"apiVersion"`
	Kind       string            `json:"kind"`
	Metadata   map[string]any    `json:"metadata"`
	Data       map[string]string `json:"data"`
}

Jump to

Keyboard shortcuts

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