utils

package
v0.0.0-...-ade2b4d Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultServicePortName default service name to increase compatibility with Knative
	//
	// see: https://github.com/knative/specs/blob/main/specs/serving/runtime-contract.md#protocols-and-ports
	// By default we do support HTTP/2:https://quarkus.io/guides/http-reference#http2-support
	DefaultServicePortName = "h2c"
	LatestImageTag         = "latest"
)

Variables

This section is empty.

Functions

func Compare

func Compare(a, b []byte) bool

func Crc32Checksum

func Crc32Checksum(v interface{}) (uint32, error)

func GetClient

func GetClient() client.Client

GetClient default client created by the main operator's thread. It's safe to use since it's set when the operator main function runs.

func GetDiscoveryClient

func GetDiscoveryClient(cfg *rest.Config) (discovery.DiscoveryInterface, error)

func GetEnv

func GetEnv(key, fallback string) string

func GetOperatorIDAnnotation

func GetOperatorIDAnnotation(obj metav1.Object) string

GetOperatorIDAnnotation to safely get the operator id annotation value.

func IsOpenShift

func IsOpenShift() bool

IsOpenShift is a global flag that can be safely called across reconciliation cycles, defined at the controller manager start.

func OperatorID

func OperatorID() string

func Pbool

func Pbool(b bool) *bool

Pbool returns a pointer to a boolean

func Pint

func Pint(i int32) *int32

Pint returns a pointer to an int

func RemoveFileExtension

func RemoveFileExtension(fileName string) string

func RemoveKnownExtension

func RemoveKnownExtension(fileName, extension string) string

func SetClient

func SetClient(client client.Client)

SetClient is meant for internal use only. Don't call it!

func SetDiscoveryClient

func SetDiscoveryClient(cli discovery.DiscoveryInterface)

func SetIsOpenShift

func SetIsOpenShift(cfg *rest.Config)

SetIsOpenShift sets the global flag isOpenShift by the controller manager. We don't need to keep fetching the API every reconciliation cycle that we need to know about the platform.

Types

type ApplicationPropertiesBuilder

type ApplicationPropertiesBuilder interface {
	WithInitialProperties(initialProperties *properties.Properties) ApplicationPropertiesBuilder
	WithImmutableProperties(immutableProperties *properties.Properties) ApplicationPropertiesBuilder
	WithDefaultManagedProperties(defaultManagedProperties *properties.Properties) ApplicationPropertiesBuilder
	BuildAsString() string
	Build() *properties.Properties
}

func NewApplicationPropertiesBuilder

func NewApplicationPropertiesBuilder() ApplicationPropertiesBuilder

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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