Documentation
¶
Index ¶
- func IllegalEmptyEnvironment() error
- func NoActiveDeploymentFoundInEnvironment(appName, envName string) error
- func NonExistingApplication(underlyingError error, appName string) error
- func NonExistingDeployment(underlyingError error, deploymentName string) error
- func NonExistingPod(appName, podName string) error
- type AuxiliaryResource
- type AuxiliaryResourceDeployment
- type AzureIdentity
- type Component
- type ComponentBuilder
- type ComponentStatus
- type ComponentStatuserFunc
- type ComponentSummary
- type ContainerStatus
- type Deployment
- type DeploymentBuilder
- type DeploymentItem
- type DeploymentItemBuilder
- type DeploymentStatus
- type DeploymentSummary
- type DeploymentSummaryPipelineJobInfo
- type ExternalDNS
- type HorizontalScalingSummary
- type HorizontalScalingSummaryTriggerStatus
- type Identity
- type Ingress
- type IngressPublic
- type Network
- type Node
- type Notifications
- type OAuth2AuxiliaryResource
- type Port
- type ReplicaStatus
- type ReplicaSummary
- type ReplicaType
- type ResourceRequirements
- type Resources
- type Runtime
- type ScheduledBatchJobStatus
- type ScheduledBatchSummary
- type ScheduledJobSummary
- type TLS
- type TLSAutomation
- type TLSAutomationStatusEnum
- type TLSStatusEnum
- type X509Certificate
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IllegalEmptyEnvironment ¶
func IllegalEmptyEnvironment() error
IllegalEmptyEnvironment From environment does not exist
func NoActiveDeploymentFoundInEnvironment ¶
NoActiveDeploymentFoundInEnvironment Deployment wasn't found
func NonExistingApplication ¶
NonExistingApplication No application found by name
func NonExistingDeployment ¶
NonExistingDeployment Deployment wasn't found
func NonExistingPod ¶
NonExistingPod Pod by name was not found
Types ¶
type AuxiliaryResource ¶
type AuxiliaryResource struct {
// OAuth2 describes the oauth2 resource
//
// required: false
// - oauth: OAuth2 auxiliary resource
OAuth2 *OAuth2AuxiliaryResource `json:"oauth2,omitempty"`
}
AuxiliaryResource describes an auxiliary resources for a component swagger:ignore
type AuxiliaryResourceDeployment ¶
type AuxiliaryResourceDeployment struct {
// Name of the auxiliary resource's deployment
//
// enum: oauth,oauth-redis,""
// required: false
Type string `json:"type,omitempty"`
// Status of the auxiliary resource's deployment
// required: true
// - Consistent: All replicas are running with the desired state
// - Reconciling: Waiting for new replicas to enter desired state
// - Stopped: Replica count is set to 0
//
// enum: Stopped,Consistent,Reconciling
// example: Consistent
Status string `json:"status"`
// Running replicas of the auxiliary resource's deployment
//
// required: false
ReplicaList []ReplicaSummary `json:"replicaList"`
}
AuxiliaryResourceDeployment describes the state of the auxiliary resource's deployment swagger:model AuxiliaryResourceDeployment
type AzureIdentity ¶
type AzureIdentity struct {
// ClientId is the client ID of an Azure User Assigned Managed Identity
// or the application ID of an Azure AD Application Registration
//
// required: true
ClientId string `json:"clientId,omitempty"`
// The Service Account name to use when configuring Kubernetes Federation Credentials for the identity
//
// required: true
ServiceAccountName string `json:"serviceAccountName,omitempty"`
// The Azure Key Vaults names, which use Azure Identity
//
// required: false
AzureKeyVaults []string `json:"azureKeyVaults,omitempty"`
}
AzureIdentity describes an identity in Azure
type Component ¶
type Component struct {
// Name the component
//
// required: true
// example: server
Name string `json:"name"`
// Type of component
//
// required: true
// enum: component,job
// example: component
Type string `json:"type"`
// Status of the component
// required: false
// - Stopped = Component is stopped (no replica)
// - Consistent = Component is consistent with config
// - Restarting = User has triggered restart, but this is not reconciled
//
// enum: Stopped,Consistent,Reconciling,Restarting,Outdated
// example: Consistent
Status string `json:"status"`
// Image name
//
// required: true
// example: radixdev.azurecr.io/app-server:cdgkg
Image string `json:"image"`
// Ports defines the port number and protocol that a component is exposed for internally in environment
//
// required: false
// type: "array"
// items:
// "$ref": "#/definitions/Port"
Ports []Port `json:"ports"`
// SchedulerPort defines the port number that a Job Scheduler is exposed internally in environment
//
// required: false
// example: 8080
SchedulerPort *int32 `json:"schedulerPort,omitempty"`
// ScheduledJobPayloadPath defines the payload path, where payload for Job Scheduler will be mapped as a file. From radixconfig.yaml
//
// required: false
// example: "/tmp/payload"
ScheduledJobPayloadPath string `json:"scheduledJobPayloadPath,omitempty"`
// Component secret names. From radixconfig.yaml
//
// required: false
// example: ["DB_CON", "A_SECRET"]
Secrets []string `json:"secrets"`
// Variable names map to values. From radixconfig.yaml
//
// required: false
Variables map[string]string `json:"variables"`
// Deprecated: Array of pod names. Use ReplicaList instead
//
// required: false
// example: ["server-78fc8857c4-hm76l", "server-78fc8857c4-asfa2"]
Replicas []string `json:"replicas"`
// Array of ReplicaSummary
//
// required: false
ReplicaList []ReplicaSummary `json:"replicaList"`
// Set if manual control of replicas is in place. Not set means automatic control, 0 means stopped and >= 1 is manually scaled.
//
// required: false
// example: 5
// Extensions:
// x-nullable: true
ReplicasOverride *int `json:"replicasOverride"`
// HorizontalScaling defines horizontal scaling summary for this component
//
// required: false
HorizontalScalingSummary *HorizontalScalingSummary `json:"horizontalScalingSummary"`
// External identity information
//
// required: false
Identity *Identity `json:"identity,omitempty"`
// Notifications is the spec for notification about internal events or changes
Notifications *Notifications `json:"notifications,omitempty"`
// Array of external DNS configurations
//
// required: false
ExternalDNS []ExternalDNS `json:"externalDNS,omitempty"`
// Commit ID for the component. It can be different from the Commit ID, specified in deployment label
//
// required: false
// example: 4faca8595c5283a9d0f17a623b9255a0d9866a2e
CommitID string `json:"commitID,omitempty"`
// GitTags the git tags that the git commit hash points to
//
// required: false
// example: "v1.22.1 v1.22.3"
GitTags string `json:"gitTags,omitempty"`
// SkipDeployment The component should not be deployed, but used existing
//
// required: false
// example: true
SkipDeployment bool `json:"skipDeployment,omitempty"`
AuxiliaryResource `json:",inline"`
// Resources Resource requirements for the pod
//
// required: false
Resources *ResourceRequirements `json:"resources,omitempty"`
// Runtime requirements for the component or job
Runtime *Runtime `json:"runtime,omitempty"`
// Network configuration for the component
//
// required: false
Network *Network `json:"network,omitempty"`
}
Component describe an component part of an deployment swagger:model Component
type ComponentBuilder ¶
type ComponentBuilder interface {
WithStatus(ComponentStatus) ComponentBuilder
WithPodNames([]string) ComponentBuilder
WithReplicaSummaryList([]ReplicaSummary) ComponentBuilder
WithSchedulerPort(schedulerPort *int32) ComponentBuilder
WithScheduledJobPayloadPath(scheduledJobPayloadPath string) ComponentBuilder
WithRadixEnvironmentVariables(map[string]string) ComponentBuilder
WithComponent(radixv1.RadixCommonDeployComponent) ComponentBuilder
WithAuxiliaryResource(AuxiliaryResource) ComponentBuilder
WithNotifications(*radixv1.Notifications) ComponentBuilder
WithHorizontalScalingSummary(*HorizontalScalingSummary) ComponentBuilder
WithExternalDNS(externalDNS []ExternalDNS) ComponentBuilder
WithRuntime(*radixv1.Runtime) ComponentBuilder
BuildComponentSummary() (*ComponentSummary, error)
BuildComponent() (*Component, error)
}
ComponentBuilder Builds DTOs
func NewComponentBuilder ¶
func NewComponentBuilder() ComponentBuilder
NewComponentBuilder Constructor for application component
type ComponentStatus ¶
type ComponentStatus int
ComponentStatus Enumeration of the statuses of component
const ( // StoppedComponent stopped component StoppedComponent ComponentStatus = iota // ConsistentComponent consistent component ConsistentComponent // ComponentReconciling Component reconciling ComponentReconciling // ComponentRestarting restarting component ComponentRestarting // ComponentOutdated has outdated image ComponentOutdated )
func ComponentStatusFromDeployment ¶
func ComponentStatusFromDeployment(component radixv1.RadixCommonDeployComponent, kd *appsv1.Deployment, rd *radixv1.RadixDeployment) ComponentStatus
func (ComponentStatus) String ¶
func (p ComponentStatus) String() string
type ComponentStatuserFunc ¶
type ComponentStatuserFunc func(component radixv1.RadixCommonDeployComponent, kd *appsv1.Deployment, rd *radixv1.RadixDeployment) ComponentStatus
type ComponentSummary ¶
type ComponentSummary struct {
// Name the component
//
// required: true
// example: server
Name string `json:"name"`
// Type of component
//
// required: true
// enum: component,job
// example: component
Type string `json:"type"`
// Image name
//
// required: true
// example: radixdev.azurecr.io/app-server:cdgkg
Image string `json:"image"`
// CommitID the commit ID of the branch to build
// REQUIRED for "build" and "build-deploy" pipelines
//
// required: false
// example: 4faca8595c5283a9d0f17a623b9255a0d9866a2e
CommitID string `json:"commitID,omitempty"`
// GitTags the git tags that the git commit hash points to
//
// required: false
// example: "v1.22.1 v1.22.3"
GitTags string `json:"gitTags,omitempty"`
// SkipDeployment The component should not be deployed, but used existing
//
// required: false
// example: true
SkipDeployment bool `json:"skipDeployment,omitempty"`
// Resources Resource requirements for the component
//
// required: false
Resources *ResourceRequirements `json:"resources,omitempty"`
// Runtime requirements for the component or job
Runtime *Runtime `json:"runtime,omitempty"`
}
ComponentSummary describe a component part of a deployment swagger:model ComponentSummary
type ContainerStatus ¶
type ContainerStatus string
ContainerStatus Enumeration of the statuses of container swagger:enum ContainerStatus
const ( // Pending container Pending ContainerStatus = "Pending" // Failed container permanently exists in a failed state Failed ContainerStatus = "Failed" // Failing container, which can attempt to restart Failing ContainerStatus = "Failing" // Running container Running ContainerStatus = "Running" // Terminated container Terminated ContainerStatus = "Terminated" // Starting container Starting ContainerStatus = "Starting" // Stopped container Stopped ContainerStatus = "Stopped" // Succeeded all containers in the pod have voluntarily terminated Succeeded ContainerStatus = "Succeeded" )
type Deployment ¶
type Deployment struct {
// Name the unique name of the Radix application deployment
//
// required: true
// example: radix-canary-golang-tzbqi
Name string `json:"name"`
// Namespace where the deployment is stored
//
// required: true
// example: radix-canary-golang-dev
Namespace string `json:"namespace"`
// Array of components
//
// required: false
Components []*Component `json:"components,omitempty"`
// Name of job creating deployment
//
// required: false
CreatedByJob string `json:"createdByJob,omitempty"`
// Environment the environment this Radix application deployment runs in
//
// required: true
// example: prod
Environment string `json:"environment"`
// Status of deployment reconciliation
//
// required: true
Status DeploymentStatus `json:"status"`
// StatusReason contains details when deployment status is Failed
//
// required: false
StatusReason string `json:"statusReason,omitempty"`
// ActiveFrom Timestamp when the deployment starts (or created)
//
// required: true
// swagger:strfmt date-time
ActiveFrom time.Time `json:"activeFrom"`
// ActiveTo Timestamp when the deployment ends
//
// required: false
// swagger:strfmt date-time
ActiveTo *time.Time `json:"activeTo"`
// GitCommitHash the hash of the git commit from which radixconfig.yaml was parsed
//
// required: false
// example: 4faca8595c5283a9d0f17a623b9255a0d9866a2e
GitCommitHash string `json:"gitCommitHash,omitempty"`
// GitTags the git tags that the git commit hash points to
//
// required: false
// example: "v1.22.1 v1.22.3"
GitTags string `json:"gitTags,omitempty"`
// Repository the GitHub repository that the deployment was built from
//
// required: true
// example: https://github.com/equinor/radix-canary-golang
Repository string `json:"repository,omitempty"`
// Name of the branch used to build the deployment
//
// required: false
// example: main
BuiltFromBranch string `json:"builtFromBranch,omitempty"`
// Enables BuildKit when building Dockerfile.
//
// required: false
// Extensions:
// x-nullable: true
UseBuildKit *bool `json:"useBuildKit,omitempty"`
// Defaults to true and requires useBuildKit to have an effect.
//
// required: false
// Extensions:
// x-nullable: true
UseBuildCache *bool `json:"useBuildCache,omitempty"`
// RefreshBuildCache forces to rebuild cache when UseBuildCache is true in the RadixApplication or OverrideUseBuildCache is true
//
// required: false
// Extensions:
// x-nullable: true
RefreshBuildCache *bool `json:"refreshBuildCache,omitempty"`
// GitRef Branch or tag to build from
//
// required: false
// example: master
GitRef string `json:"gitRef,omitempty"`
// GitRefType When the pipeline job should be built from branch or tag specified in GitRef:
// - branch
// - tag
// - <empty> - either branch or tag
//
// required: false
// enum: branch,tag,""
// example: branch
GitRefType string `json:"gitRefType,omitempty"`
}
Deployment describe an deployment swagger:model Deployment
func (*Deployment) GetComponentByName ¶
func (d *Deployment) GetComponentByName(name string) *Component
type DeploymentBuilder ¶
type DeploymentBuilder interface {
WithRadixDeployment(*v1.RadixDeployment) DeploymentBuilder
WithPipelineJob(*v1.RadixJob) DeploymentBuilder
WithComponents(components []*Component) DeploymentBuilder
WithGitCommitHash(string) DeploymentBuilder
WithGitTags(string) DeploymentBuilder
WithRadixRegistration(*v1.RadixRegistration) DeploymentBuilder
BuildDeploymentSummary() (*DeploymentSummary, error)
BuildDeployment() (*Deployment, error)
}
DeploymentBuilder Builds DTOs
func NewDeploymentBuilder ¶
func NewDeploymentBuilder() DeploymentBuilder
NewDeploymentBuilder Constructor for application deploymentBuilder
type DeploymentItem ¶
type DeploymentItem struct {
// Name the unique name of the Radix application deployment
//
// required: true
// example: radix-canary-golang-tzbqi
Name string `json:"name"`
// ActiveFrom Timestamp when the deployment starts (or created)
//
// required: true
// swagger:strfmt date-time
ActiveFrom time.Time `json:"activeFrom"`
// ActiveTo Timestamp when the deployment ends
//
// required: false
// swagger:strfmt date-time
ActiveTo *time.Time `json:"activeTo"`
// GitCommitHash the hash of the git commit from which radixconfig.yaml was parsed
//
// required: false
// example: 4faca8595c5283a9d0f17a623b9255a0d9866a2e
GitCommitHash string `json:"gitCommitHash,omitempty"`
}
DeploymentItem describe a deployment short info swagger:model DeploymentItem
type DeploymentItemBuilder ¶
type DeploymentItemBuilder interface {
WithRadixDeployment(*v1.RadixDeployment) DeploymentItemBuilder
Build() (*DeploymentItem, error)
}
DeploymentItemBuilder Builds DTOs
func NewDeploymentItemBuilder ¶
func NewDeploymentItemBuilder() DeploymentItemBuilder
NewDeploymentItemBuilder Constructor for application DeploymentItemBuilder
type DeploymentStatus ¶
type DeploymentStatus string
DeploymentStatus Enumeration of deployment reconciliation states swagger:enum DeploymentStatus
const ( // DeploymentStatusReconciling deployment is not fully reconciled DeploymentStatusReconciling DeploymentStatus = "Reconciling" // DeploymentStatusReady deployment is reconciled successfully DeploymentStatusReady DeploymentStatus = "Ready" // DeploymentStatusFailed deployment reconciliation failed DeploymentStatusFailed DeploymentStatus = "Failed" // DeploymentStatusInactive deployment is inactive DeploymentStatusInactive DeploymentStatus = "Inactive" )
type DeploymentSummary ¶
type DeploymentSummary struct {
DeploymentSummaryPipelineJobInfo `json:",inline"`
// Name the unique name of the Radix application deployment
//
// required: true
// example: radix-canary-golang-tzbqi
Name string `json:"name"`
// Array of component summaries
//
// required: false
Components []*ComponentSummary `json:"components,omitempty"`
// Environment the environment this Radix application deployment runs in
//
// required: true
// example: prod
Environment string `json:"environment"`
// Status of deployment reconciliation
//
// required: true
Status DeploymentStatus `json:"status"`
// StatusReason contains details when deployment status is Failed
//
// required: false
StatusReason string `json:"statusReason,omitempty"`
// ActiveFrom Timestamp when the deployment starts (or created)
//
// required: true
// swagger:strfmt date-time
ActiveFrom time.Time `json:"activeFrom"`
// ActiveTo Timestamp when the deployment ends
//
// required: false
// swagger:strfmt date-time
ActiveTo *time.Time `json:"activeTo"`
// GitCommitHash the hash of the git commit from which radixconfig.yaml was parsed
//
// required: false
// example: 4faca8595c5283a9d0f17a623b9255a0d9866a2e
GitCommitHash string `json:"gitCommitHash,omitempty"`
// GitTags the git tags that the git commit hash points to
//
// required: false
// example: "v1.22.1 v1.22.3"
GitTags string `json:"gitTags,omitempty"`
// Enables BuildKit when building Dockerfile.
//
// required: false
// Extensions:
// x-nullable: true
UseBuildKit *bool `json:"useBuildKit,omitempty"`
// Defaults to true and requires useBuildKit to have an effect.
//
// required: false
// Extensions:
// x-nullable: true
UseBuildCache *bool `json:"useBuildCache,omitempty"`
// RefreshBuildCache forces to rebuild cache when UseBuildCache is true in the RadixApplication or OverrideUseBuildCache is true
//
// required: false
// Extensions:
// x-nullable: true
RefreshBuildCache *bool `json:"refreshBuildCache,omitempty"`
}
DeploymentSummary describe an deployment swagger:model DeploymentSummary
type DeploymentSummaryPipelineJobInfo ¶
type DeploymentSummaryPipelineJobInfo struct {
// Name of job creating deployment
//
// required: false
CreatedByJob string `json:"createdByJob,omitempty"`
// Type of pipeline job
//
// required: false
// enum: build,build-deploy,promote,deploy,apply-config
// example: build-deploy
PipelineJobType string `json:"pipelineJobType,omitempty"`
// Name of the branch used to build the deployment
//
// required: false
// example: main
BuiltFromBranch string `json:"builtFromBranch,omitempty"`
// Name of the environment the deployment was promoted from
// Applies only for pipeline jobs of type 'promote'
//
// required: false
// example: qa
PromotedFromEnvironment string `json:"promotedFromEnvironment,omitempty"`
// CommitID the commit ID of the branch to build
//
// required: false
// example: 4faca8595c5283a9d0f17a623b9255a0d9866a2e
CommitID string `json:"commitID,omitempty"`
// GitRef Branch or tag to build from
//
// required: false
// example: master
GitRef string `json:"gitRef,omitempty"`
// GitRefType When the pipeline job should be built from branch or tag specified in GitRef:
// - branch
// - tag
// - <empty> - either branch or tag
//
// required: false
// enum: branch,tag,""
// example: branch
GitRefType string `json:"gitRefType,omitempty"`
}
swagger:ignore
type ExternalDNS ¶
type ExternalDNS struct {
// Fully Qualified Domain Name
//
// required: true
// example: site.example.com
FQDN string `json:"fqdn"`
// TLS configuration
//
// required: true
TLS TLS `json:"tls"`
}
ExternalDNS describes an external DNS entry for a component swagger:model ExternalDNS
type HorizontalScalingSummary ¶
type HorizontalScalingSummary struct {
// Component minimum replicas. From radixconfig.yaml
//
// example: 2
MinReplicas *int32 `json:"minReplicas,omitempty"`
// Component maximum replicas. From radixconfig.yaml
//
// example: 5
MaxReplicas *int32 `json:"maxReplicas,omitempty"`
// CooldownPeriod in seconds. From radixconfig.yaml
//
// example: 300
CooldownPeriod *int32 `json:"cooldownPeriod,omitempty"`
// PollingInterval in seconds. From radixconfig.yaml
//
// example: 30
PollingInterval *int32 `json:"pollingInterval,omitempty"`
// Triggers lists status of all triggers found in radixconfig.yaml
//
// required: true
Triggers []HorizontalScalingSummaryTriggerStatus `json:"triggers"`
// Deprecated: Component current average CPU utilization over all pods, represented as a percentage of requested CPU. Use Triggers instead. Will be removed from Radix API 2025-01-01.
//
// example: 70
CurrentCPUUtilizationPercentage *int32 `json:"currentCPUUtilizationPercentage"`
// Deprecated: Component target average CPU utilization over all pods. Use Triggers instead. Will be removed from Radix API 2025-01-01.
//
// example: 80
TargetCPUUtilizationPercentage *int32 `json:"targetCPUUtilizationPercentage"`
// Deprecated: Component current average memory utilization over all pods, represented as a percentage of requested memory. Use Triggers instead. Will be removed from Radix API 2025-01-01.
//
// example: 80
CurrentMemoryUtilizationPercentage *int32 `json:"currentMemoryUtilizationPercentage"`
// Deprecated: Component target average memory utilization over all pods. use Triggers instead. Will be removed from Radix API 2025-01-01.
//
// example: 80
TargetMemoryUtilizationPercentage *int32 `json:"targetMemoryUtilizationPercentage"`
// CurrentReplicas returns the current number of replicas
// example: 1
// required: true
CurrentReplicas int32 `json:"currentReplicas"`
// DesiredReplicas returns the target number of replicas across all triggers
// example: 2
// required: true
DesiredReplicas int32 `json:"desiredReplicas"`
}
HorizontalScalingSummary describe the summary of horizontal scaling of a component swagger:model HorizontalScalingSummary
type HorizontalScalingSummaryTriggerStatus ¶
type HorizontalScalingSummaryTriggerStatus struct {
// Name of trigger
Name string `json:"name"`
// CurrentUtilization is the last measured utilization
CurrentUtilization string `json:"currentUtilization"`
// TargetUtilization is the average target across replicas
TargetUtilization string `json:"targetUtilization"`
// Type of trigger
Type string `json:"type"`
// Error contains short description if trigger have problems
Error string `json:"error,omitempty"`
}
type Identity ¶
type Identity struct {
// Azure identity
//
// required: false
Azure *AzureIdentity `json:"azure,omitempty"`
}
Identity describes external identities
type Ingress ¶
type Ingress struct {
// Public ingress configuration
//
// required: false
Public *IngressPublic `json:"public,omitempty"`
}
Ingress describes ingress configuration for a component swagger:model Ingress
type IngressPublic ¶
type IngressPublic struct {
// List of allowed IP addresses or CIDRs. All traffic is allowed if list is empty.
//
// required: true
Allow []string `json:"allow"`
}
IngressPublic describes public ingress configuration for a component swagger:model IngressPublic
type Network ¶
type Network struct {
// Ingress configuration
//
// required: false
Ingress *Ingress `json:"ingress,omitempty"`
}
Network describes network configuration for a component swagger:model Network
type Node ¶
type Node struct {
// Gpu Holds lists of node GPU types, with dashed types to exclude
Gpu string `json:"gpu,omitempty"`
// GpuCount Holds minimum count of GPU on node
GpuCount string `json:"gpuCount,omitempty"`
}
Node Defines node attributes, where pod should be scheduled
type Notifications ¶
type Notifications struct {
// Webhook is a URL for notification about internal events or changes. The URL should be of a Radix component or job-component, with not public port.
//
// required: false
Webhook *string `json:"webhook,omitempty"`
}
Notifications is the spec for notification about internal events or changes
type OAuth2AuxiliaryResource ¶
type OAuth2AuxiliaryResource struct {
// Deprecated. Use Deployments instead
// Deployment describes the underlying Kubernetes deployment for the resource
//
// required: true
Deployment AuxiliaryResourceDeployment `json:"deployment,omitempty"`
// Deployments describes the underlying Kubernetes deployments for the resource
//
// required: false
Deployments []AuxiliaryResourceDeployment `json:"deployments,omitempty"`
// External identity information
//
// required: false
Identity *Identity `json:"identity,omitempty"`
// SessionStoreType type of session store
//
// enum: cookie,redis,systemManaged,""
// required: false
SessionStoreType string `json:"sessionStoreType,omitempty"`
}
type Port ¶
type Port struct {
// Component port name. From radixconfig.yaml
//
// required: true
// example: http
Name string `json:"name"`
// Component port number. From radixconfig.yaml
//
// required: true
// example: 8080
Port int32 `json:"port"`
// IsPublic indicates that the port is accessible from the Internet by proxying traffic from 443
//
// required: true
// example: true
IsPublic bool `json:"isPublic"`
}
Port describe a port of a component swagger:model Port
type ReplicaStatus ¶
type ReplicaStatus struct {
// Status of the container
// - Pending = Container in Waiting state and the reason is ContainerCreating
// - Starting = Container is starting
// - Failed = Container is failed
// - Failing = Container is failed
// - Running = Container in Running state
// - Succeeded = Container in Succeeded state
// - Stopped = Replica was deleted du to job stopped
// - Terminated = Container in Terminated state
//
// required: true
// example: Running
Status ContainerStatus `json:"status"`
}
ReplicaStatus describes the status of a component container inside a pod swagger:model ReplicaStatus
type ReplicaSummary ¶
type ReplicaSummary struct {
// Pod name
//
// required: true
// example: server-78fc8857c4-hm76l
Name string `json:"name"`
// Pod type
// - ComponentReplica = Replica of a Radix component
// - ScheduledJobReplica = Replica of a Radix job-component
// - JobManager = Replica of a Radix job-component scheduler
// - JobManagerAux = Replica of a Radix job-component scheduler auxiliary
// - OAuth2 = Replica of a Radix OAuth2 component
// - Undefined = Replica without defined type - to be extended
//
// required: false
// enum: ComponentReplica,ScheduledJobReplica,JobManager,JobManagerAux,OAuth2,OAuth2Redis,Undefined
// example: ComponentReplica
Type string `json:"type"`
// Created timestamp
//
// required: true
// swagger:strfmt date-time
Created time.Time `json:"created"`
// The time at which the batch job's pod finishedAt.
//
// required: false
// swagger:strfmt date-time
EndTime *time.Time `json:"endTime"`
// Container started timestamp
//
// required: false
// swagger:strfmt date-time
ContainerStarted *time.Time `json:"containerStarted"`
// Status describes the component container status
//
// required: false
Status ReplicaStatus `json:"replicaStatus,omitempty"`
// StatusMessage provides message describing the status of a component container inside a pod
//
// required: false
StatusMessage string `json:"statusMessage,omitempty"`
// RestartCount count of restarts of a component container inside a pod
//
// required: false
RestartCount int32 `json:"restartCount,omitempty"`
// The image the container is running.
//
// required: false
// example: radixdev.azurecr.io/app-server:cdgkg
Image string `json:"image,omitempty"`
// ImageID of the container's image.
//
// required: false
// example: radixdev.azurecr.io/app-server@sha256:d40cda01916ef63da3607c03785efabc56eb2fc2e0dab0726b1a843e9ded093f
ImageId string `json:"imageId,omitempty"`
// The index of the pod in the re-starts
PodIndex int `json:"podIndex,omitempty"`
// Exit status from the last termination of the container
ExitCode int32 `json:"exitCode"`
// A brief CamelCase message indicating details about why the job is in this phase
Reason string `json:"reason,omitempty"`
// Resources Resource requirements for the pod
//
// required: false
Resources *ResourceRequirements `json:"resources,omitempty"`
}
ReplicaSummary describes condition of a pod swagger:model ReplicaSummary
func GetReplicaSummary ¶
func GetReplicaSummary(pod corev1.Pod, lastEventWarning string) ReplicaSummary
type ReplicaType ¶
type ReplicaType int
ReplicaType The replica type
const ( // JobManager Replica of a Radix job-component scheduler JobManager ReplicaType = iota // JobManagerAux Replica of a Radix job-component scheduler auxiliary JobManagerAux // OAuth2 Replica of a Radix OAuth2 Proxy component OAuth2 // OAuth2Redis Replica of a Radix OAuth2 Redis component OAuth2Redis // Undefined Replica without defined type - to be extended Undefined )
type ResourceRequirements ¶
type ResourceRequirements struct {
Limits Resources `json:"limits,omitempty"`
Requests Resources `json:"requests,omitempty"`
}
ResourceRequirements Requirements of resources for pods
func ConvertRadixResourceRequirements ¶
func ConvertRadixResourceRequirements(resources v1.ResourceRequirements) ResourceRequirements
ConvertRadixResourceRequirements Convert resource requirements
func ConvertResourceRequirements ¶
func ConvertResourceRequirements(resources corev1.ResourceRequirements) ResourceRequirements
ConvertResourceRequirements Convert resource requirements
type Runtime ¶
type Runtime struct {
// CPU architecture
//
// example: amd64
Architecture string `json:"architecture,omitempty"`
// NodeType is the node type of the component
//
// example:memory-optimized-2-v1
NodeType string `json:"nodeType,omitempty"`
}
Runtime requirements for the component or job
func NewRuntime ¶
NewRuntime creates an API runtime model by the Radix runtime
type ScheduledBatchJobStatus ¶
type ScheduledBatchJobStatus string
ScheduledBatchJobStatus Enumeration of the statuses of a scheduled job swagger:enum ScheduledBatchJobStatus
const ( // ScheduledBatchJobStatusRunning Active ScheduledBatchJobStatusRunning ScheduledBatchJobStatus = "Running" // ScheduledBatchJobStatusSucceeded Job succeeded ScheduledBatchJobStatusSucceeded ScheduledBatchJobStatus = "Succeeded" // ScheduledBatchJobStatusFailed Job failed ScheduledBatchJobStatusFailed ScheduledBatchJobStatus = "Failed" // ScheduledBatchJobStatusWaiting Job pending ScheduledBatchJobStatusWaiting ScheduledBatchJobStatus = "Waiting" // ScheduledBatchJobStatusStopping job is stopping ScheduledBatchJobStatusStopping ScheduledBatchJobStatus = "Stopping" // ScheduledBatchJobStatusStopped job stopped ScheduledBatchJobStatusStopped ScheduledBatchJobStatus = "Stopped" // ScheduledBatchJobStatusActive job, one or more pods are not ready ScheduledBatchJobStatusActive ScheduledBatchJobStatus = "Active" // ScheduledBatchJobStatusCompleted batch jobs are completed ScheduledBatchJobStatusCompleted ScheduledBatchJobStatus = "Completed" )
type ScheduledBatchSummary ¶
type ScheduledBatchSummary struct {
// Name of the scheduled batch
//
// required: true
// example: batch-20181029135644-algpv-6hznh
Name string `json:"name"`
// Defines a user defined ID of the batch.
//
// required: false
BatchId string `json:"batchId,omitempty"`
// Created timestamp
//
// required: false
// swagger:strfmt date-time
Created *time.Time `json:"created"`
// Started timestamp
//
// required: false
// swagger:strfmt date-time
Started *time.Time `json:"started"`
// Ended timestamp
//
// required: false
// swagger:strfmt date-time
Ended *time.Time `json:"ended"`
// Status of the job
//
// required: true
// example: Waiting
Status ScheduledBatchJobStatus `json:"status"`
// TotalJobCount count of jobs, requested to be scheduled by a batch
//
// required: true
// example: 5
TotalJobCount int `json:"totalJobCount"`
// Jobs within the batch of ScheduledJobSummary
//
// required: false
JobList []ScheduledJobSummary `json:"jobList,omitempty"`
// DeploymentName name of RadixDeployment for the batch
//
// required: true
DeploymentName string `json:"deploymentName"`
}
ScheduledBatchSummary holds information about scheduled batch swagger:model ScheduledBatchSummary
func (*ScheduledBatchSummary) GetCreated ¶
func (job *ScheduledBatchSummary) GetCreated() *time.Time
func (*ScheduledBatchSummary) GetEnded ¶
func (job *ScheduledBatchSummary) GetEnded() *time.Time
func (*ScheduledBatchSummary) GetStarted ¶
func (job *ScheduledBatchSummary) GetStarted() *time.Time
func (*ScheduledBatchSummary) GetStatus ¶
func (job *ScheduledBatchSummary) GetStatus() string
type ScheduledJobSummary ¶
type ScheduledJobSummary struct {
// Name of the scheduled job
//
// required: true
// example: job-component-20181029135644-algpv-6hznh
Name string `json:"name"`
// Created timestamp
//
// required: false
// swagger:strfmt date-time
Created *time.Time `json:"created"`
// Started timestamp
//
// required: false
// swagger:strfmt date-time
Started *time.Time `json:"started"`
// Ended timestamp
//
// required: false
// swagger:strfmt date-time
Ended *time.Time `json:"ended"`
// Status of the job
//
// required: true
// example: Waiting
Status ScheduledBatchJobStatus `json:"status"`
// Message of a status, if any, of the job
//
// required: false
// example: "Error occurred"
Message string `json:"message,omitempty"`
// Array of ReplicaSummary
//
// required: false
ReplicaList []ReplicaSummary `json:"replicaList,omitempty"`
// JobId JobId, if any
//
// required: false
// example: "job1"
JobId string `json:"jobId,omitempty"`
// BatchName Batch name, if any
//
// required: false
// example: "batch-abc"
BatchName string `json:"batchName,omitempty"`
// TimeLimitSeconds How long the job supposed to run at maximum
//
// required: false
// example: 3600
TimeLimitSeconds *int64 `json:"timeLimitSeconds,omitempty"`
// BackoffLimit Amount of retries due to a logical error in configuration etc.
//
// required: true
// example: 1
BackoffLimit int32 `json:"backoffLimit"`
// Resources Resource requirements for the job
//
// required: false
Resources ResourceRequirements `json:"resources,omitempty"`
// Node Defines node attributes, where pod should be scheduled
//
// required: false
Node *Node `json:"node,omitempty"`
// Runtime requirements for the batch job
Runtime *Runtime `json:"runtime,omitempty"`
// DeploymentName name of RadixDeployment for the job
//
// required: true
DeploymentName string `json:"deploymentName"`
// FailedCount is the number of times the job has failed
//
// required: true
// example: 1
FailedCount int32 `json:"failedCount"`
// Timestamp of the job restart, if applied.
// +optional
Restart string
// Variable names map to values specified for this job.
//
// required: false
Variables map[string]string `json:"variables,omitempty"`
// Command is the entrypoint array specified for the job. Not executed within a shell.
//
// required: false
Command []string `json:"command,omitempty"`
// Args to the entrypoint specified for the job.
//
// required: false
Args []string `json:"args,omitempty"`
}
ScheduledJobSummary holds general information about scheduled job swagger:model ScheduledJobSummary
func (*ScheduledJobSummary) GetCreated ¶
func (job *ScheduledJobSummary) GetCreated() *time.Time
func (*ScheduledJobSummary) GetEnded ¶
func (job *ScheduledJobSummary) GetEnded() *time.Time
func (*ScheduledJobSummary) GetStarted ¶
func (job *ScheduledJobSummary) GetStarted() *time.Time
func (*ScheduledJobSummary) GetStatus ¶
func (job *ScheduledJobSummary) GetStatus() string
type TLS ¶
type TLS struct {
// UseAutomation describes if TLS certificate is automatically issued using automation (ACME)
//
// required: true
UseAutomation bool `json:"useAutomation"`
// Automation describes the current condition of a certificate automation request
// Only set if UseAutomation is true
//
// required: false
Automation *TLSAutomation `json:"automation,omitempty"`
// Status of TLS certificate and private key
//
// required: true
// example: Consistent
Status TLSStatusEnum `json:"status"`
// StatusMessages contains a list of messages related to Status
//
// required: false
StatusMessages []string `json:"statusMessages,omitempty"`
// Certificates holds the X509 certificate chain
// The first certificate in the list should be the host certificate and the rest should be intermediate certificates
//
// required: false
Certificates []X509Certificate `json:"certificates,omitempty"`
}
TLS configuration and status for external DNS swagger:model TLS
type TLSAutomation ¶
type TLSAutomation struct {
// Status of certificate automation request
//
// required: true
// example: Pending
Status TLSAutomationStatusEnum `json:"status"`
// Message is a human readable description of the reason for the status
//
// required: false
Message string `json:"message"`
}
TLSAutomation describes the current condition of TLS automation swagger:model TLSAutomation
type TLSAutomationStatusEnum ¶
type TLSAutomationStatusEnum string
swagger:enum TLSAutomationStatusEnum
const ( // Certificate automation request pending TLSAutomationPending TLSAutomationStatusEnum = "Pending" // Certificate automation request succeeded TLSAutomationSuccess TLSAutomationStatusEnum = "Success" // Certificate automation request failed TLSAutomationFailed TLSAutomationStatusEnum = "Failed" )
type TLSStatusEnum ¶
type TLSStatusEnum string
swagger:enum TLSStatusEnum
const ( // TLS certificate and private key not set TLSStatusPending TLSStatusEnum = "Pending" // TLS certificate and private key is valid TLSStatusConsistent TLSStatusEnum = "Consistent" // TLS certificate and private key is invalid TLSStatusInvalid TLSStatusEnum = "Invalid" )
type X509Certificate ¶
type X509Certificate struct {
// Subject contains the distinguished name for the certificate
//
// required: true
// example: CN=mysite.example.com,O=MyOrg,L=MyLocation,C=NO
Subject string `json:"subject"`
// Issuer contains the distinguished name for the certificate's issuer
//
// required: true
// example: CN=DigiCert TLS RSA SHA256 2020 CA1,O=DigiCert Inc,C=US
Issuer string `json:"issuer"`
// NotBefore defines the lower date/time validity boundary
//
// required: true
// swagger:strfmt date-time
// example: 2022-08-09T00:00:00Z
NotBefore time.Time `json:"notBefore"`
// NotAfter defines the uppdater date/time validity boundary
//
// required: true
// swagger:strfmt date-time
// example: 2023-08-25T23:59:59Z
NotAfter time.Time `json:"notAfter"`
// DNSNames defines list of Subject Alternate Names in the certificate
//
// required: false
DNSNames []string `json:"dnsNames,omitempty"`
}
X509Certificate holds information about a X509 certificate swagger:model X509Certificate
func ParseX509CertificatesFromPEM ¶
func ParseX509CertificatesFromPEM(certBytes []byte) []X509Certificate
ParseX509CertificatesFromPEM builds an array of X509Certificate from PEM encoded data