convert

package
v0.0.1-rc1 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Workload

func Workload(currentState *state.State, workloadName string) (string, error)

Workload converts a Score workload to a Bicep manifest

Types

type ContainerAppConfiguration

type ContainerAppConfiguration struct {
	ActiveRevisionsMode  string               `json:"activeRevisionsMode,omitempty"`
	Ingress              *ContainerAppIngress `json:"ingress,omitempty"`
	MaxInactiveRevisions int                  `json:"maxInactiveRevisions,omitempty"`
}

ContainerAppConfiguration represents the configuration of an Azure Container App

type ContainerAppContainer

type ContainerAppContainer struct {
	Name      string                `json:"name"`
	Image     string                `json:"image"`
	Command   []string              `json:"command,omitempty"`
	Args      []string              `json:"args,omitempty"`
	Env       []ContainerAppEnv     `json:"env,omitempty"`
	Resources ContainerAppResources `json:"resources"`
	Probes    []ContainerAppProbe   `json:"probes,omitempty"`
}

ContainerAppContainer represents a container in an Azure Container App

type ContainerAppEnv

type ContainerAppEnv struct {
	Name  string `json:"name"`
	Value string `json:"value,omitempty"`
}

ContainerAppEnv represents an environment variable in an Azure Container App

type ContainerAppHTTPGet

type ContainerAppHTTPGet struct {
	Path        string                   `json:"path"`
	Port        int                      `json:"port"`
	Scheme      string                   `json:"scheme,omitempty"`
	HTTPHeaders []ContainerAppHTTPHeader `json:"httpHeaders,omitempty"`
}

ContainerAppHTTPGet represents an HTTP GET probe in an Azure Container App

type ContainerAppHTTPHeader

type ContainerAppHTTPHeader struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

ContainerAppHTTPHeader represents an HTTP header in an Azure Container App

type ContainerAppIngress

type ContainerAppIngress struct {
	External               bool                    `json:"external"`
	TargetPort             int                     `json:"targetPort"`
	Transport              string                  `json:"transport,omitempty"`
	AllowInsecure          bool                    `json:"allowInsecure,omitempty"`
	Traffic                []ContainerAppTraffic   `json:"traffic,omitempty"`
	IPSecurityRestrictions []IPSecurityRestriction `json:"ipSecurityRestrictions,omitempty"`
}

ContainerAppIngress represents the ingress configuration of an Azure Container App

type ContainerAppProbe

type ContainerAppProbe struct {
	Type    string               `json:"type"`
	HTTPGet *ContainerAppHTTPGet `json:"httpGet,omitempty"`
}

ContainerAppProbe represents a probe in an Azure Container App

type ContainerAppProperties

type ContainerAppProperties struct {
	Configuration ContainerAppConfiguration `json:"configuration"`
	Template      ContainerAppTemplate      `json:"template"`
	// Optional fields
	EnvironmentID       string `json:"environmentId,omitempty"`
	WorkloadProfileName string `json:"workloadProfileName,omitempty"`
}

ContainerAppProperties represents the properties of an Azure Container App

type ContainerAppResources

type ContainerAppResources struct {
	CPU    float64 `json:"cpu"`
	Memory string  `json:"memory"`
}

ContainerAppResources represents the resources of a container in an Azure Container App

type ContainerAppTemplate

type ContainerAppTemplate struct {
	Containers []ContainerAppContainer `json:"containers"`
}

ContainerAppTemplate represents the template of an Azure Container App

type ContainerAppTraffic

type ContainerAppTraffic struct {
	Weight         int    `json:"weight"`
	LatestRevision bool   `json:"latestRevision"`
	RevisionName   string `json:"revisionName,omitempty"`
	Label          string `json:"label,omitempty"`
}

ContainerAppTraffic represents the traffic configuration of an Azure Container App

type IPSecurityRestriction

type IPSecurityRestriction struct {
	Name           string `json:"name"`
	Action         string `json:"action"`
	IPAddressRange string `json:"ipAddressRange"`
	Description    string `json:"description,omitempty"`
}

IPSecurityRestriction represents an IP security restriction

Jump to

Keyboard shortcuts

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