Categorygithub.com/x-ethr/go-kubernetes-testing
repository
0.0.2
Repository: https://github.com/x-ethr/go-kubernetes-testing.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# README

go-kubernetes-testing

go-kubernetes-testing provides utilities for Kubernetes testing.

Documentation

Official godoc documentation (with examples) can be found at the Package Registry.

Usage

Add Package Dependency
go get -u github.com/x-ethr/go-kubernetes-testing
Import & Implement

main.go

package main

import (
	"context"
	"fmt"

	"github.com/x-ethr/go-kubernetes-testing"
)

func main() {
	ctx := context.Background()

	instance := secrets.New()
	if e := instance.Walk(ctx, "/etc/secrets"); e != nil {
		panic(e)
	}

	for secret, keys := range instance {
		for key, value := range keys {
			fmt.Println("Secret", secret, "Key", key, "Value", value)
		}
	}

	service := instance["service"]

	port := service["port"]
	hostname := service["hostname"]
	username := service["username"]
	password := service["password"]

	fmt.Println("Port", port, "Hostname", hostname, "Username", username, "Password", password)
}

Contributions

See the Contributing Guide for additional details on getting started.