nstemplatetier

package
v0.0.0-...-7b31e83 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AppStudioEnvTemplates = toolchainv1alpha1.NSTemplateTierSpec{
	Namespaces: []toolchainv1alpha1.NSTemplateTierNamespace{
		{
			TemplateRef: "appstudio-env-88b275d-88b275d",
		},
	},
	ClusterResources: &toolchainv1alpha1.NSTemplateTierClusterResources{
		TemplateRef: "appstudio-env-clusterresources-e0e1f34-e0e1f34",
	},
	SpaceRoles: map[string]toolchainv1alpha1.NSTemplateTierSpaceRole{
		"admin": {
			TemplateRef: "appstudio-env-admin-ba5db27-ba5db27",
		},
		"contributor": {
			TemplateRef: "appstudio-env-contributor-88b275d-88b275d",
		},
		"maintainer": {
			TemplateRef: "appstudio-env-maintainer-0d170ba-0d170ba",
		},
	},
	SpaceRequestConfig: &toolchainv1alpha1.SpaceRequestConfig{
		ServiceAccountName: toolchainv1alpha1.AdminServiceAccountName,
	},
}

AppStudioEnvTemplates current templates for the "appstudio-env" tier

View Source
var CurrentBase1nsTemplates = toolchainv1alpha1.NSTemplateTierSpec{
	Namespaces: []toolchainv1alpha1.NSTemplateTierNamespace{
		{
			TemplateRef: "base1ns-code-123456new",
		},
		{
			TemplateRef: "base1ns-dev-123456new",
		},
		{
			TemplateRef: "base1ns-stage-123456new",
		},
	},
	ClusterResources: &toolchainv1alpha1.NSTemplateTierClusterResources{
		TemplateRef: "base1ns-clusterresources-123456new",
	},
	SpaceRoles: map[string]toolchainv1alpha1.NSTemplateTierSpaceRole{
		"admin": {
			TemplateRef: "base1ns-admin-123456new",
		},
		"edit": {
			TemplateRef: "base1ns-edit-123456new",
		},
		"viewer": {
			TemplateRef: "base1ns-viewer-123456new",
		},
	},
}

CurrentBase1nsTemplates current templates for the "base1ns" tier

View Source
var PreviousBase1nsTemplates = toolchainv1alpha1.NSTemplateTierSpec{
	Namespaces: []toolchainv1alpha1.NSTemplateTierNamespace{
		{
			TemplateRef: "base1ns-code-123456old",
		},
		{
			TemplateRef: "base1ns-dev-123456old",
		},
		{
			TemplateRef: "base1ns-stage-123456old",
		},
	},
	ClusterResources: &toolchainv1alpha1.NSTemplateTierClusterResources{
		TemplateRef: "base1ns-clusterresources-123456old",
	},
	SpaceRoles: map[string]toolchainv1alpha1.NSTemplateTierSpaceRole{
		"admin": {
			TemplateRef: "base1ns-admin-123456old",
		},
		"viewer": {
			TemplateRef: "base1ns-viewer-123456old",
		},
	},
}

PreviousBase1nsTemplates previous templates for the "base1ns" tier

Functions

func AppStudioEnvTier

AppStudioEnvTier returns an "appstudio-env" NSTemplateTier with template refs in the given spec

func Base1nsTier

Base1nsTier returns a "base1ns" NSTemplateTier with template refs in the given spec

func NewNSTemplateTier

func NewNSTemplateTier(tierName string, nsTypes ...string) *toolchainv1alpha1.NSTemplateTier

func OtherTier

func OtherTier() *toolchainv1alpha1.NSTemplateTier

OtherTier returns an "other" NSTemplateTier

func TierWithoutDeactivationTimeout

func TierWithoutDeactivationTimeout() *toolchainv1alpha1.NSTemplateTier

TierWithoutDeactivationTimeout returns a NSTemplateTier with no deactivation timeout set

Types

type Assertion

type Assertion struct {
	// contains filtered or unexported fields
}

Assertion an assertion helper for an NSTemplateTier

func AssertThatNSTemplateTier

func AssertThatNSTemplateTier(t test.T, name string, client runtimeclient.Client) *Assertion

AssertThatNSTemplateTier helper func to begin with the assertions on an NSTemplateTier

func (*Assertion) HasLatestUpdate

func (a *Assertion) HasLatestUpdate(expected toolchainv1alpha1.NSTemplateTierHistory) *Assertion

HasLatestUpdate verifies the latest `status.updates`

func (*Assertion) HasStatusUpdatesItems

func (a *Assertion) HasStatusUpdatesItems(expected int) *Assertion

HasStatusUpdatesItems verifies the number of items in `status.updates`

func (*Assertion) HasValidPreviousUpdates

func (a *Assertion) HasValidPreviousUpdates() *Assertion

HasValidPreviousUpdates verifies the previous `status.updates` in particular, it checks that: - `StartTime` is not nil - `Hash` is not nil

type TierOption

type TierOption func(*toolchainv1alpha1.NSTemplateTier)

TierOption an option to configure the NStemplateTier

func WithCurrentUpdate

func WithCurrentUpdate() TierOption

WithCurrentUpdate appends an entry in the `status.updates` for the current tier

func WithPreviousUpdates

func WithPreviousUpdates(entries ...toolchainv1alpha1.NSTemplateTierHistory) TierOption

WithPreviousUpdates adds the given entries in the `status.updates`

func WithoutClusterResources

func WithoutClusterResources() TierOption

WithoutClusterResources removes the `clusterResources` templates from the tier's specs.

func WithoutCodeNamespace

func WithoutCodeNamespace() TierOption

WithoutCodeNamespace removes the `code` templates from the tier's specs.

Jump to

Keyboard shortcuts

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