Documentation
¶
Index ¶
- Variables
- func EnvVarChangedFields(existing nais_io_v1.EnvVars, merged nais_io_v1.EnvVars) []*activitylog.ResourceChangedField
- func EnvVarsEqual(a, b nais_io_v1.EnvVars) bool
- func GetPod(ctx context.Context, environmentName string, teamSlug slug.Slug, ...) (*v1.Pod, error)
- func ListAllPods(ctx context.Context, environmentName string, teamSlug slug.Slug, ...) ([]*v1.Pod, error)
- func ListAllPodsForJob(ctx context.Context, environmentName string, teamSlug slug.Slug, ...) ([]*v1.Pod, error)
- func MergeEnvVars(existing nais_io_v1.EnvVars, updates []*UpdateWorkloadEnvironmentVariableInput) nais_io_v1.EnvVars
- func NewLoaderContext(ctx context.Context, podWatcher *watcher.Watcher[*corev1.Pod]) context.Context
- func NewWatcher(ctx context.Context, mgr *watcher.Manager) *watcher.Watcher[*corev1.Pod]
- type ApplicationAuthIntegrations
- type AuthIntegration
- type Base
- func (b Base) GetAccessPolicy() *nais_io_v1.AccessPolicy
- func (b Base) GetAnnotations() map[string]string
- func (b Base) GetConditions() []metav1.Condition
- func (b Base) GetEnvironmentName() string
- func (b Base) GetImageString() string
- func (b Base) GetLogging() *nais_io_v1.Logging
- func (b Base) GetName() string
- func (b Base) GetRolloutCompleteTime() int64
- func (b Base) GetTeamSlug() slug.Slug
- func (b Base) GetType() Type
- func (b Base) Image() *ContainerImage
- type ContainerImage
- type EntraIDAuthIntegration
- type EnvironmentWorkloadOrder
- type EnvironmentWorkloadOrderField
- type IDPortenAuthIntegration
- type JobAuthIntegrations
- type MaskinportenAuthIntegration
- type Reference
- type TeamWorkloadsFilter
- type TokenXAuthIntegration
- type Type
- type UpdateWorkloadEnvironmentVariableInput
- type Workload
- type WorkloadConnection
- type WorkloadEdge
- type WorkloadManifest
- type WorkloadOrder
- type WorkloadOrderField
- type WorkloadResourceQuantity
- type WorkloadResources
Constants ¶
This section is empty.
Variables ¶
View Source
var ( SortFilter = sortfilter.New[Workload, WorkloadOrderField, *TeamWorkloadsFilter]() SortFilterEnvironment = sortfilter.New[Workload, EnvironmentWorkloadOrderField, struct{}]() )
Functions ¶
func EnvVarChangedFields ¶
func EnvVarChangedFields(existing nais_io_v1.EnvVars, merged nais_io_v1.EnvVars) []*activitylog.ResourceChangedField
func EnvVarsEqual ¶
func EnvVarsEqual(a, b nais_io_v1.EnvVars) bool
func ListAllPods ¶
func ListAllPodsForJob ¶
func MergeEnvVars ¶
func MergeEnvVars(existing nais_io_v1.EnvVars, updates []*UpdateWorkloadEnvironmentVariableInput) nais_io_v1.EnvVars
func NewLoaderContext ¶
Types ¶
type ApplicationAuthIntegrations ¶
type ApplicationAuthIntegrations interface {
AuthIntegration
}
type AuthIntegration ¶
type AuthIntegration interface {
IsAuthIntegration()
}
type Base ¶
type Base struct {
Name string `json:"name"`
EnvironmentName string `json:"-"`
TeamSlug slug.Slug `json:"-"`
ImageString string `json:"-"`
Conditions []metav1.Condition `json:"-"`
AccessPolicy *nais_io_v1.AccessPolicy `json:"-"`
Annotations map[string]string `json:"-"`
RolloutCompleteTime int64 `json:"-"`
Type Type `json:"-"`
Logging *nais_io_v1.Logging `json:"-"`
DeletionStartedAt *time.Time `json:"deletedAt"`
}
func (Base) GetAccessPolicy ¶
func (b Base) GetAccessPolicy() *nais_io_v1.AccessPolicy
func (Base) GetAnnotations ¶
func (Base) GetConditions ¶
func (Base) GetEnvironmentName ¶
func (Base) GetImageString ¶
func (Base) GetLogging ¶
func (b Base) GetLogging() *nais_io_v1.Logging
func (Base) GetRolloutCompleteTime ¶
func (Base) GetTeamSlug ¶
func (Base) Image ¶
func (b Base) Image() *ContainerImage
type ContainerImage ¶
func (ContainerImage) ID ¶
func (c ContainerImage) ID() ident.Ident
func (ContainerImage) IsActivityLogger ¶
func (ContainerImage) IsActivityLogger()
func (ContainerImage) IsNode ¶
func (ContainerImage) IsNode()
func (ContainerImage) Ref ¶
func (c ContainerImage) Ref() string
type EntraIDAuthIntegration ¶
type EntraIDAuthIntegration struct{}
func GetEntraIDAuthIntegrationForApplication ¶
func GetEntraIDAuthIntegrationForApplication(azure *nais_io_v1.Azure) *EntraIDAuthIntegration
func GetEntraIDAuthIntegrationForJob ¶
func GetEntraIDAuthIntegrationForJob(azure *nais_io_v1.AzureNaisJob) *EntraIDAuthIntegration
func (EntraIDAuthIntegration) IsAuthIntegration ¶
func (EntraIDAuthIntegration) IsAuthIntegration()
func (EntraIDAuthIntegration) Name ¶
func (EntraIDAuthIntegration) Name() string
type EnvironmentWorkloadOrder ¶
type EnvironmentWorkloadOrder struct {
Field EnvironmentWorkloadOrderField `json:"field"`
Direction model.OrderDirection `json:"direction"`
}
type EnvironmentWorkloadOrderField ¶
type EnvironmentWorkloadOrderField string
func (EnvironmentWorkloadOrderField) IsValid ¶
func (e EnvironmentWorkloadOrderField) IsValid() bool
func (EnvironmentWorkloadOrderField) MarshalGQL ¶
func (e EnvironmentWorkloadOrderField) MarshalGQL(w io.Writer)
func (EnvironmentWorkloadOrderField) String ¶
func (e EnvironmentWorkloadOrderField) String() string
func (*EnvironmentWorkloadOrderField) UnmarshalGQL ¶
func (e *EnvironmentWorkloadOrderField) UnmarshalGQL(v any) error
type IDPortenAuthIntegration ¶
type IDPortenAuthIntegration struct{}
func GetIDPortenAuthIntegration ¶
func GetIDPortenAuthIntegration(idp *nais_io_v1.IDPorten) *IDPortenAuthIntegration
func (IDPortenAuthIntegration) IsAuthIntegration ¶
func (IDPortenAuthIntegration) IsAuthIntegration()
func (IDPortenAuthIntegration) Name ¶
func (IDPortenAuthIntegration) Name() string
type JobAuthIntegrations ¶
type JobAuthIntegrations interface {
AuthIntegration
}
type MaskinportenAuthIntegration ¶
type MaskinportenAuthIntegration struct{}
func GetMaskinPortenAuthIntegration ¶
func GetMaskinPortenAuthIntegration(mp *nais_io_v1.Maskinporten) *MaskinportenAuthIntegration
func (MaskinportenAuthIntegration) IsAuthIntegration ¶
func (MaskinportenAuthIntegration) IsAuthIntegration()
func (MaskinportenAuthIntegration) Name ¶
func (MaskinportenAuthIntegration) Name() string
type Reference ¶
type Reference struct {
// Name is the name of the referenced workload.
Name string
// Type is the type of the referenced workload.
Type Type
}
func ReferenceFromOwnerReferences ¶
func ReferenceFromOwnerReferences(ownerReferences []metav1.OwnerReference) *Reference
ReferenceFromOwnerReferences returns a Reference for the first valid owner reference. If none can be found, nil is returned.
type TeamWorkloadsFilter ¶
type TokenXAuthIntegration ¶
type TokenXAuthIntegration struct{}
func GetTokenXAuthIntegration ¶
func GetTokenXAuthIntegration(tx *nais_io_v1.TokenX) *TokenXAuthIntegration
func (TokenXAuthIntegration) IsAuthIntegration ¶
func (TokenXAuthIntegration) IsAuthIntegration()
func (TokenXAuthIntegration) Name ¶
func (TokenXAuthIntegration) Name() string
type Type ¶
type Type int
func TypeFromString ¶
TypeFromString returns the Type for the given string. If the string does not match any known type, -1 is returned.
type Workload ¶
type Workload interface {
model.Node
activitylog.ActivityLogger
IsWorkload()
GetName() string
GetEnvironmentName() string
GetTeamSlug() slug.Slug
GetImageString() string
GetAccessPolicy() *nais_io_v1.AccessPolicy
GetConditions() []metav1.Condition
GetAnnotations() map[string]string
GetRolloutCompleteTime() int64
GetType() Type
GetLogging() *nais_io_v1.Logging
// GetSecrets returns a list of secret names used by the workload
GetSecrets() []string
// GetConfigs returns a list of config names used by the workload
GetConfigs() []string
Image() *ContainerImage
}
type WorkloadConnection ¶
type WorkloadConnection = pagination.Connection[Workload]
type WorkloadEdge ¶
type WorkloadEdge = pagination.Edge[Workload]
type WorkloadManifest ¶
type WorkloadManifest interface {
IsWorkloadManifest()
}
type WorkloadOrder ¶
type WorkloadOrder struct {
Field WorkloadOrderField `json:"field"`
Direction model.OrderDirection `json:"direction"`
}
type WorkloadOrderField ¶
type WorkloadOrderField string
func (WorkloadOrderField) IsValid ¶
func (e WorkloadOrderField) IsValid() bool
func (WorkloadOrderField) MarshalGQL ¶
func (e WorkloadOrderField) MarshalGQL(w io.Writer)
func (WorkloadOrderField) String ¶
func (e WorkloadOrderField) String() string
func (*WorkloadOrderField) UnmarshalGQL ¶
func (e *WorkloadOrderField) UnmarshalGQL(v any) error
type WorkloadResources ¶
type WorkloadResources interface {
IsWorkloadResources()
}
Directories
¶
| Path | Synopsis |
|---|---|
|
Package secret provides operations for managing Kubernetes secrets.
|
Package secret provides operations for managing Kubernetes secrets. |
Click to show internal directories.
Click to hide internal directories.