datamodel

package
v0.38.0 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const ApplicationResourceType = "Applications.Core/applications"
View Source
const (
	// AzureKeyVaultVolume represents the resource of azure keyvault volume.
	AzureKeyVaultVolume string = "azure.com.keyvault"
)
View Source
const ContainerResourceType = "Applications.Core/containers"
View Source
const EnvironmentResourceType = "Applications.Core/environments"
View Source
const ExtenderResourceType = "Applications.Core/extenders"

ExtenderResourceType is the resource type for Extender portable resources.

View Source
const GatewayResourceType = "Applications.Core/gateways"
View Source
const SecretStoreResourceType = "Applications.Core/secretStores"
View Source
const VolumeResourceType = "Applications.Core/volumes"

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application struct {
	v1.BaseResource

	// Properties is the properties of the resource.
	Properties ApplicationProperties `json:"properties"`
}

Application represents Application resource.

func (*Application) ApplyDeploymentOutput

func (c *Application) ApplyDeploymentOutput(do rpv1.DeploymentOutput) error

ApplyDeploymentOutput updates the status of the application with the output resources from the deployment and returns no error.

func (*Application) OutputResources

func (c *Application) OutputResources() []rpv1.OutputResource

OutputResources returns the OutputResources from the Application instance.

func (*Application) ResourceMetadata

func (h *Application) ResourceMetadata() *rpv1.BasicResourceProperties

ResourceMetadata returns the BasicResourceProperties of the Application instance.

func (*Application) ResourceTypeName

func (e *Application) ResourceTypeName() string

ResourceTypeName returns the resource type name of the Application instance.

type ApplicationProperties

type ApplicationProperties struct {
	rpv1.BasicResourceProperties

	Extensions []Extension `json:"extensions,omitempty"`
}

ApplicationProperties represents the properties of Application.

type AuthConfig added in v0.31.0

type AuthConfig struct {
	// Authentication information used to access private Terraform modules from Git repository sources.
	Git GitAuthConfig `json:"git,omitempty"`
}

AuthConfig - Authentication information used to access private Terraform module sources. Supported module sources: Git.

type AzureKeyVaultVolumeProperties

type AzureKeyVaultVolumeProperties struct {
	// The KeyVault certificates that this volume exposes
	Certificates map[string]CertificateObjectProperties `json:"certificates,omitempty"`
	// The KeyVault keys that this volume exposes
	Keys map[string]KeyObjectProperties `json:"keys,omitempty"`
	// The ID of the keyvault to use for this volume resource
	Resource string `json:"resource,omitempty"`
	// The KeyVault secrets that this volume exposes
	Secrets map[string]SecretObjectProperties `json:"secrets,omitempty"`
}

AzureKeyVaultVolumeProperties represents the volume for Azure Keyvault.

type BicepConfigProperties added in v0.38.0

type BicepConfigProperties struct {
	// Authentication holds the information used to access private bicep registries, which is a map of registry hostname to secret config
	// that contains credential information.
	Authentication map[string]RegistrySecretConfig
}

BicepConfigProperties - Configuration for Bicep Recipes. Controls how Bicep plans and applies templates as part of Recipe deployment.

type CertificateFormat

type CertificateFormat string
const (
	CertificateFormatPEM CertificateFormat = "pem"
	CertificateFormatPFX CertificateFormat = "pfx"
)

type CertificateObjectProperties

type CertificateObjectProperties struct {
	// The name of the certificate
	Name string `json:"name"`
	// File name when written to disk.
	Alias string `json:"alias,omitempty"`
	// Encoding format. Default utf-8
	Encoding *SecretEncoding `json:"encoding,omitempty"`
	// Certificate format. Default pem
	Format *CertificateFormat `json:"format,omitempty"`
	// Certificate version
	Version string `json:"version,omitempty"`
	// Certificate object type to be downloaded - the certificate itself, private key or public key of the certificate
	CertType *CertificateType `json:"certType,omitempty"`
}

CertificateObjectProperties represents the certificate for Volume.

type CertificateType

type CertificateType string
const (
	CertificateTypePrivateKey  CertificateType = "privatekey"
	CertificateTypePublicKey   CertificateType = "publickey"
	CertificateTypeCertificate CertificateType = "certificate"
)

type ConnectionProperties

type ConnectionProperties struct {
	Source                string        `json:"source,omitempty"`
	DisableDefaultEnvVars *bool         `json:"disableDefaultEnvVars,omitempty"`
	IAM                   IAMProperties `json:"iam,omitempty"`
}

ConnectionProperties represents the properties of Connection.

func (ConnectionProperties) GetDisableDefaultEnvVars

func (conn ConnectionProperties) GetDisableDefaultEnvVars() bool

GetDisableDefaultEnvVars returns the value of the DisableDefaultEnvVars field of the ConnectionProperties struct, or false if the field is nil.

type Container

type Container struct {
	Image           string                         `json:"image,omitempty"`
	ImagePullPolicy string                         `json:"imagePullPolicy,omitempty"`
	Env             map[string]EnvironmentVariable `json:"env,omitempty"`
	LivenessProbe   HealthProbeProperties          `json:"livenessProbe,omitempty"`
	Ports           map[string]ContainerPort       `json:"ports,omitempty"`
	ReadinessProbe  HealthProbeProperties          `json:"readinessProbe,omitempty"`
	Volumes         map[string]VolumeProperties    `json:"volumes,omitempty"`
	Command         []string                       `json:"command,omitempty"`
	Args            []string                       `json:"args,omitempty"`
	WorkingDir      string                         `json:"workingDir,omitempty"`
}

Container - Definition of a container.

type ContainerPort

type ContainerPort struct {
	ContainerPort int32    `json:"containerPort,omitempty"`
	Port          int32    `json:"port,omitempty"`
	Scheme        string   `json:"scheme,omitempty"`
	Protocol      Protocol `json:"protocol,omitempty"`
}

ContainerPort - Specifies a listening port for the container

type ContainerProperties

type ContainerProperties struct {
	rpv1.BasicResourceProperties
	Connections          map[string]ConnectionProperties `json:"connections,omitempty"`
	Container            Container                       `json:"container,omitempty"`
	Extensions           []Extension                     `json:"extensions,omitempty"`
	Identity             *rpv1.IdentitySettings          `json:"identity,omitempty"`
	Runtimes             *RuntimeProperties              `json:"runtimes,omitempty"`
	Resources            []ResourceReference             `json:"resources,omitempty"`
	ResourceProvisioning ContainerResourceProvisioning   `json:"resourceProvisioning,omitempty"`
	RestartPolicy        string                          `json:"restartPolicy,omitempty"`
}

ContainerProperties represents the properties of Container.

type ContainerResource

type ContainerResource struct {
	v1.BaseResource

	// TODO: remove this from CoreRP
	PortableResourceMetadata

	// Properties is the properties of the resource.
	Properties ContainerProperties `json:"properties"`
}

ContainerResource represents Container resource.

func (*ContainerResource) ApplyDeploymentOutput

func (c *ContainerResource) ApplyDeploymentOutput(do rpv1.DeploymentOutput) error

ApplyDeploymentOutput updates the ContainerResource's Properties, ComputedValues and SecretValues with the DeploymentOutput's DeployedOutputResources, ComputedValues and SecretValues respectively and returns no error.

func (*ContainerResource) OutputResources

func (c *ContainerResource) OutputResources() []rpv1.OutputResource

OutputResources returns the OutputResources from the ContainerResource's Properties Status.

func (*ContainerResource) ResourceMetadata

func (h *ContainerResource) ResourceMetadata() *rpv1.BasicResourceProperties

ResourceMetadata returns the BasicResourceProperties of the ContainerResource instance.

func (ContainerResource) ResourceTypeName

func (c ContainerResource) ResourceTypeName() string

ResourceTypeName returns the qualified name of the resource.

type ContainerResourceProvisioning added in v0.26.0

type ContainerResourceProvisioning string

ContainerResourceProvisioning specifies how resources should be created for the container.

const (
	// ContainerResourceProvisioningInternal specifies that Radius will create resources for the container according to its internal logic.
	ContainerResourceProvisioningInternal ContainerResourceProvisioning = "internal"

	// ContainerResourceProvisioningManual specifies that Radius will not create resources for the container, and the user will have to create them manually.
	ContainerResourceProvisioningManual ContainerResourceProvisioning = "manual"
)

type DaprSidecarExtension

type DaprSidecarExtension struct {
	AppID    string   `json:"appId,omitempty"`
	AppPort  int32    `json:"appPort,omitempty"`
	Config   string   `json:"config,omitempty"`
	Protocol Protocol `json:"protocol,omitempty"`
}

DaprSidecarExtension - Specifies the resource should have a Dapr sidecar injected

type Environment

type Environment struct {
	v1.BaseResource

	// Properties is the properties of the resource.
	Properties EnvironmentProperties `json:"properties"`
}

Environment represents Application environment resource.

func (*Environment) ResourceTypeName

func (e *Environment) ResourceTypeName() string

ResourceTypeName returns the resource type of the Environment instance.

type EnvironmentProperties

type EnvironmentProperties struct {
	Compute      rpv1.EnvironmentCompute                           `json:"compute,omitempty"`
	Recipes      map[string]map[string]EnvironmentRecipeProperties `json:"recipes,omitempty"`
	Providers    Providers                                         `json:"providers,omitempty"`
	RecipeConfig RecipeConfigProperties                            `json:"recipeConfig,omitempty"`
	Extensions   []Extension                                       `json:"extensions,omitempty"`
	Simulated    bool                                              `json:"simulated,omitempty"`
}

EnvironmentProperties represents the properties of Environment.

type EnvironmentRecipeProperties

type EnvironmentRecipeProperties struct {
	TemplateKind    string         `json:"templateKind"`
	TemplatePath    string         `json:"templatePath"`
	TemplateVersion string         `json:"templateVersion,omitempty"`
	Parameters      map[string]any `json:"parameters,omitempty"`
	PlainHTTP       bool           `json:"plainHttp,omitempty"`
}

EnvironmentRecipeProperties represents the properties of environment's recipe.

func (*EnvironmentRecipeProperties) ResourceTypeName

func (e *EnvironmentRecipeProperties) ResourceTypeName() string

ResourceTypeName returns the resource type of the EnvironmentRecipeProperties instance.

type EnvironmentVariable added in v0.38.0

type EnvironmentVariable struct {
	// Value is the property for the environment variable specified by the user. Such as "key": "value"
	Value *string `json:"value,omitempty"`
	// ValueFrom is the property for the environment variable specified by a reference to a secret.
	ValueFrom *EnvironmentVariableReference `json:"valueFrom,omitempty"`
}

EnvironmentVariable - Environment variable for the container

type EnvironmentVariableReference added in v0.38.0

type EnvironmentVariableReference struct {
	// SecretRef is the property for the environment variable specified by a reference to a secret.
	SecretRef *EnvironmentVariableSecretReference `json:"secretRef"`
}

EnvironmentVariableReference - Environment variable reference for the container

type EnvironmentVariableSecretReference added in v0.38.0

type EnvironmentVariableSecretReference struct {
	// Source is either the resource id of a radius Applications.Core/secretStore resource or a kubernetes secret reference.
	Source string `json:"source"`
	Key    string `json:"key"`
}

EnvironmentVariableSecretReference - Environment variable secret reference for the container

type EnvironmentVariables added in v0.31.0

type EnvironmentVariables struct {
	// AdditionalProperties represents the non-sensitive environment variables to be set for the recipe execution.
	AdditionalProperties map[string]string `json:"additionalProperties,omitempty"`
}

EnvironmentVariables represents the environment variables to be set for the recipe execution.

type EphemeralVolume

type EphemeralVolume struct {
	VolumeBase
	ManagedStore ManagedStore `json:"managedStore,omitempty"`
}

EphemeralVolume - Specifies an ephemeral volume for a container

type ExecHealthProbeProperties

type ExecHealthProbeProperties struct {
	HealthProbeBase
	Command string `json:"command,omitempty"`
}

ExecHealthProbeProperties - Specifies the properties for readiness/liveness probe using an executable

type Extender

type Extender struct {
	v1.BaseResource

	// Properties is the properties of the resource.
	Properties ExtenderProperties `json:"properties"`

	// PortableResourceMetadata represents internal DataModel properties common to all portable resource types.
	PortableResourceMetadata
}

Extender represents Extender portable resource.

func (*Extender) ApplyDeploymentOutput

func (r *Extender) ApplyDeploymentOutput(do rpv1.DeploymentOutput) error

ApplyDeploymentOutput updates the Status of Properties of the Extender resource with the DeployedOutputResources and returns no error.

func (*Extender) OutputResources

func (r *Extender) OutputResources() []rpv1.OutputResource

OutputResources returns the OutputResources of the Extender resource.

func (*Extender) Recipe

Recipe returns the ResourceRecipe associated with the Extender if the ResourceProvisioning is not set to Manual, otherwise it returns nil.

func (*Extender) ResourceMetadata

func (r *Extender) ResourceMetadata() *rpv1.BasicResourceProperties

ResourceMetadata returns the BasicResourceProperties of the Extender resource.

func (*Extender) ResourceTypeName

func (r *Extender) ResourceTypeName() string

ResourceTypeName returns the resource type of the extender resource.

type ExtenderProperties

type ExtenderProperties struct {
	rpv1.BasicResourceProperties
	// Additional properties for the resource
	AdditionalProperties map[string]any `json:"additionalProperties,omitempty"`
	// Secrets values provided for the resource
	Secrets map[string]any `json:"secrets,omitempty"`
	// The recipe used to automatically deploy underlying infrastructure for the Extender
	ResourceRecipe portableresources.ResourceRecipe `json:"recipe,omitempty"`
	// Specifies how the underlying service/resource is provisioned and managed
	ResourceProvisioning portableresources.ResourceProvisioning `json:"resourceProvisioning,omitempty"`
}

ExtenderProperties represents the properties of Extender resource.

type Extension

type Extension struct {
	Kind                ExtensionKind           `json:"kind,omitempty"`
	ManualScaling       *ManualScalingExtension `json:"manualScaling,omitempty"`
	DaprSidecar         *DaprSidecarExtension   `json:"daprSidecar,omitempty"`
	KubernetesMetadata  *KubeMetadataExtension  `json:"kubernetesMetadata,omitempty"`
	KubernetesNamespace *KubeNamespaceExtension `json:"kubernetesNamespace,omitempty"`
}

Extension of a resource.

func FindExtension

func FindExtension(exts []Extension, kind ExtensionKind) *Extension

FindExtension searches a slice of Extensions for one with a matching ExtensionKind.

type ExtensionKind

type ExtensionKind string

ExtensionKind

const (
	ManualScaling                ExtensionKind = "manualScaling"
	DaprSidecar                  ExtensionKind = "daprSidecar"
	KubernetesMetadata           ExtensionKind = "kubernetesMetadata"
	KubernetesNamespaceExtension ExtensionKind = "kubernetesNamespace"
)

type Gateway

type Gateway struct {
	v1.BaseResource

	// TODO: remove this from CoreRP
	PortableResourceMetadata
	// Properties is the properties of the resource.
	Properties GatewayProperties `json:"properties"`
}

Gateway represents Gateway resource.

func (*Gateway) ApplyDeploymentOutput

func (g *Gateway) ApplyDeploymentOutput(do rpv1.DeploymentOutput) error

ApplyDeploymentOutput sets the Status, ComputedValues, SecretValues and URL properties of the Gateway struct based on the DeploymentOutput object.

func (*Gateway) OutputResources

func (g *Gateway) OutputResources() []rpv1.OutputResource

OutputResources returns the OutputResources from the Status of the Gateway Properties.

func (*Gateway) ResourceMetadata

func (h *Gateway) ResourceMetadata() *rpv1.BasicResourceProperties

ResourceMetadata returns the BasicResourceProperties of the Gateway instance.

func (*Gateway) ResourceTypeName

func (g *Gateway) ResourceTypeName() string

ResourceTypeName returns the resource type of the Gateway instance.

type GatewayProperties

type GatewayProperties struct {
	rpv1.BasicResourceProperties
	Internal bool                       `json:"internal,omitempty"`
	Hostname *GatewayPropertiesHostname `json:"hostname,omitempty"`
	TLS      *GatewayPropertiesTLS      `json:"tls,omitempty"`
	Routes   []GatewayRoute             `json:"routes,omitempty"`
	URL      string                     `json:"url,omitempty"`
}

GatewayProperties represents the properties of Gateway.

type GatewayPropertiesHostname

type GatewayPropertiesHostname struct {
	FullyQualifiedHostname string `json:"fullyQualifiedHostname,omitempty"`
	Prefix                 string `json:"prefix,omitempty"`
}

GatewayPropertiesHostname - Declare hostname information for the Gateway.

type GatewayPropertiesTLS

type GatewayPropertiesTLS struct {
	SSLPassthrough         bool                      `json:"sslPassthrough,omitempty"`
	MinimumProtocolVersion MinimumTLSProtocolVersion `json:"minimumProtocolVersion,omitempty"`
	CertificateFrom        string                    `json:"certificateFrom,omitempty"`
}

GatewayPropertiesTLS - Declare TLS information for the Gateway.

type GatewayRoute

type GatewayRoute struct {
	Destination      string `json:"destination,omitempty"`
	Path             string `json:"path,omitempty"`
	ReplacePrefix    string `json:"replacePrefix,omitempty"`
	EnableWebsockets bool   `json:"enableWebsockets,omitempty"`
}

GatewayRoute represents the route attached to Gateway.

type GitAuthConfig added in v0.31.0

type GitAuthConfig struct {
	// Personal Access Token (PAT) configuration used to authenticate to Git platforms.
	PAT map[string]SecretConfig `json:"pat,omitempty"`
}

GitAuthConfig - Authentication information used to access private Terraform modules from Git repository sources.

type HTTPGetHealthProbeProperties

type HTTPGetHealthProbeProperties struct {
	HealthProbeBase
	ContainerPort int32             `json:"containerPort,omitempty"`
	Path          string            `json:"path,omitempty"`
	Headers       map[string]string `json:"headers,omitempty"`
}

HTTPGetHealthProbeProperties - Specifies the properties for readiness/liveness probe using HTTP Get

type HealthProbeBase

type HealthProbeBase struct {
	FailureThreshold    *float32 `json:"failureThreshold,omitempty"`
	InitialDelaySeconds *float32 `json:"initialDelaySeconds,omitempty"`
	PeriodSeconds       *float32 `json:"periodSeconds,omitempty"`
	TimeoutSeconds      *float32 `json:"timeoutSeconds,omitempty"`
}

HealthProbeBase - Properties for readiness/liveness probe

type HealthProbeKind

type HealthProbeKind string
const (
	ExecHealthProbe    HealthProbeKind = "exec"
	HTTPGetHealthProbe HealthProbeKind = "httpGet"
	TCPHealthProbe     HealthProbeKind = "tcp"
)

type HealthProbeProperties

type HealthProbeProperties struct {
	Kind    HealthProbeKind               `json:"kind"`
	Exec    *ExecHealthProbeProperties    `json:"exec,omitempty"`
	HTTPGet *HTTPGetHealthProbeProperties `json:"httpGet,omitempty"`
	TCP     *TCPHealthProbeProperties     `json:"tcp,omitempty"`
}

HealthProbeProperties - Properties for readiness/liveness probe

func (HealthProbeProperties) IsEmpty

func (h HealthProbeProperties) IsEmpty() bool

IsEmpty checks if the HealthProbeProperties is empty or not.

type IAMKind

type IAMKind string

Kind - The kind of IAM provider to configure

const (
	KindAzure                   IAMKind = "azure"
	KindAzureComKeyVault        IAMKind = "azure.com/KeyVault"
	KindAzureComServiceBusQueue IAMKind = "azure.com/ServiceBusQueue"
	KindDaprIoPubSubTopic       IAMKind = "dapr.io/PubSubTopic"
	KindDaprIoSecretStore       IAMKind = "dapr.io/SecretStore"
	KindDaprIoStateStore        IAMKind = "dapr.io/StateStore"
	KindGrpc                    IAMKind = "Grpc"
	KindHTTP                    IAMKind = "Http"
	KindMicrosoftComSQL         IAMKind = "microsoft.com/SQL"
	KindMongoComMongoDB         IAMKind = "mongo.com/MongoDB"
	KindRabbitmqComMessageQueue IAMKind = "rabbitmq.com/MessageQueue"
	KindRedislabsComRedis       IAMKind = "redislabs.com/Redis"
)

func Kinds

func Kinds() []IAMKind

Kinds returns a list of supported IAMKinds.

func (IAMKind) IsKind

func (k IAMKind) IsKind(kind IAMKind) bool

IsKind compares two IAMKinds and returns true if they are equal.

func (IAMKind) IsValid

func (k IAMKind) IsValid() bool

IsValid checks if the IAMKind is valid by comparing it to the list of valid IAMKinds.

type IAMProperties

type IAMProperties struct {
	Kind  IAMKind  `json:"kind,omitempty"`
	Roles []string `json:"roles,omitempty"`
}

IAMProperties represents the properties of IAM provider.

type KeyObjectProperties

type KeyObjectProperties struct {
	// The name of the key
	Name string `json:"name"`
	// File name when written to disk.
	Alias string `json:"alias,omitempty"`
	// Key version
	Version string `json:"version,omitempty"`
}

KeyObjectProperties represents Key object volume.

type KubeMetadataExtension

type KubeMetadataExtension struct {
	Annotations map[string]string `json:"annotations,omitempty"`
	Labels      map[string]string `json:"labels,omitempty"`
}

KubeMetadataExtension represents the extension of kubernetes resource.

type KubeNamespaceExtension

type KubeNamespaceExtension struct {
	Namespace string `json:"namespace,omitempty"`
}

KubeNamespaceOverrideExtension represents the extension to override kubernetes namespace.

type KubernetesRuntime

type KubernetesRuntime struct {
	// Base represents the Kubernetes resource definition in the serialized YAML format
	Base string `json:"base,omitempty"`

	// Pod represents the Kubernetes PodSpec strategic merge patch to be applied to the rendered PodSpec. This is stored as a JSON-encoded string.
	Pod string `json:"pod,omitempty"`
}

KubernetesRuntime represents the Kubernetes runtime configuration.

type ManagedStore

type ManagedStore string

ManagedStore - Backing store for the ephemeral volume

const (
	ManagedStoreDisk   ManagedStore = "disk"
	ManagedStoreMemory ManagedStore = "memory"
)

type ManualScalingExtension

type ManualScalingExtension struct {
	Replicas *int32 `json:"replicas,omitempty"`
}

ManualScalingExtension - ManualScaling Extension

type MinimumTLSProtocolVersion

type MinimumTLSProtocolVersion string

MinimumTLSProtocolVersion represents the minimum TLS protocol version supported by the Gateway.

const (
	// TLS 1.2
	TLSMinVersion12 MinimumTLSProtocolVersion = "1.2"
	// TLS 1.3
	TLSMinVersion13 MinimumTLSProtocolVersion = "1.3"
	// Default is TLS 1.2
	DefaultTLSMinVersion MinimumTLSProtocolVersion = TLSMinVersion12
)

func ValidMinimumTLSProtocolVersions

func ValidMinimumTLSProtocolVersions() []MinimumTLSProtocolVersion

// ValidMinimumTLSProtocolVersions returns a slice of valid MinimumTLSProtocolVersions.

func (MinimumTLSProtocolVersion) IsEqualTo

func (m MinimumTLSProtocolVersion) IsEqualTo(minimumTLSProtocolVersion MinimumTLSProtocolVersion) bool

IsEqualTo compares two MinimumTLSProtocolVersion objects and returns true if they are equal.

func (MinimumTLSProtocolVersion) IsValid

func (m MinimumTLSProtocolVersion) IsValid() bool

IsValid checks if the given MinimumTLSProtocolVersion is valid.

type PersistentVolume

type PersistentVolume struct {
	VolumeBase
	Source     string           `json:"source,omitempty"`
	Permission VolumePermission `json:"permission,omitempty"`
}

PersistentVolume - Specifies a persistent volume for a container

type PortableResourceMetadata

type PortableResourceMetadata struct {

	// ComputedValues map is any resource values that will be needed for more operations.
	// For example; database name to generate secrets for cosmos DB.
	ComputedValues map[string]any `json:"computedValues,omitempty"`

	// Stores action to retrieve secret values. For Azure, connectionstring is accessed through cosmos listConnectionString operation, if secrets are not provided as input
	SecretValues map[string]rpv1.SecretValueReference `json:"secretValues,omitempty"`
}

PortableResourceMetadata represents internal DataModel properties common to all portable resource types.

type Protocol

type Protocol string

Protocol - Protocol in use by the port

const (
	ProtocolGrpc Protocol = "grpc"
	ProtocolHTTP Protocol = "http"
	ProtocolTCP  Protocol = "TCP"
	ProtocolUDP  Protocol = "UDP"
)

type ProviderConfigProperties added in v0.31.0

type ProviderConfigProperties struct {
	// AdditionalProperties represents the non-sensitive environment variables to be set for the recipe execution.
	AdditionalProperties map[string]any `json:"additionalProperties,omitempty"`

	// Secrets represents the secrets to be set for recipe execution in the current Provider configuration.
	Secrets map[string]SecretReference `json:"secrets,omitempty"`
}

type Providers

type Providers struct {
	// Azure provider information
	Azure ProvidersAzure `json:"azure,omitempty"`
	// AWS provider information
	AWS ProvidersAWS `json:"aws,omitempty"`
}

Providers represents configs for providers for the environment, eg azure,aws

type ProvidersAWS

type ProvidersAWS struct {
	// Scope is the target level for deploying the aws resources
	Scope string `json:"scope,omitempty"`
}

ProvidersAWS represents the aws provider configs

type ProvidersAzure

type ProvidersAzure struct {
	// Scope is the target level for deploying the azure resources
	Scope string `json:"scope,omitempty"`
}

ProvidersAzure represents the azure provider configs

type Recipe

type Recipe struct {
	// Type of the portable resource this recipe can be consumed by. For example: 'Applications.Datastores/mongoDatabases'
	ResourceType string `json:"resourceType,omitempty"`

	// Name of the recipe registered to the environment.
	Name string `json:"recipeName,omitempty"`
}

Recipe represents input properties for recipe getMetadata api.

func (*Recipe) ResourceTypeName

func (e *Recipe) ResourceTypeName() string

ResourceTypeName returns the resource type of the Recipe instance.

type RecipeConfigProperties added in v0.31.0

type RecipeConfigProperties struct {
	// Configuration for Terraform Recipes. Controls how Terraform plans and applies templates as part of Recipe deployment.
	Terraform TerraformConfigProperties `json:"terraform,omitempty"`

	// BicepConfigProperties represents configuration for Bicep Recipes. Controls how Bicep plans and applies templates as part of Recipe deployment.
	Bicep BicepConfigProperties `json:"bicep,omitempty"`

	// Env specifies the environment variables to be set during the Terraform Recipe execution.
	Env EnvironmentVariables `json:"env,omitempty"`

	// EnvSecrets represents the environment secrets for the recipe.
	// The keys of the map are the names of the secrets, and the values are the references to the secrets.
	EnvSecrets map[string]SecretReference `json:"envSecrets,omitempty"`
}

RecipeConfigProperties - Configuration for Recipes. Defines how each type of Recipe should be configured and run.

type RegistrySecretConfig added in v0.38.0

type RegistrySecretConfig struct {
	// Secret is the ID of an Applications.Core/SecretStore resource containing credential information used to authenticate private
	// container registry. The keys in the secretstore depends on the type.
	Secret string
}

RegistrySecretConfig - Registry Secret Configuration used to authenticate to private bicep registries.

type ResourceReference added in v0.26.0

type ResourceReference struct {
	ID string `json:"id,omitempty"`
}

type RuntimeProperties

type RuntimeProperties struct {
	// Kubernetes represents the Kubernetes runtime configuration.
	Kubernetes *KubernetesRuntime `json:"kubernetes,omitempty"`
}

RuntimeProperties represents the runtime configuration for the platform-specific functionalities.

type SecretConfig added in v0.31.0

type SecretConfig struct {
	// The ID of an Applications.Core/SecretStore resource containing the Git platform personal access token (PAT). The secret
	// store must have a secret named 'pat', containing the PAT value. A secret named
	// 'username' is optional, containing the username associated with the pat. By default no username is specified.
	Secret string `json:"secret,omitempty"`
}

SecretConfig - Personal Access Token (PAT) configuration used to authenticate to Git platforms.

type SecretEncoding

type SecretEncoding string

SecretEncoding is the encoding for the secret object.

const (
	SecretObjectPropertiesEncodingBase64 SecretEncoding = "base64"
	SecretObjectPropertiesEncodingHex    SecretEncoding = "hex"
	SecretObjectPropertiesEncodingUTF8   SecretEncoding = "utf-8"
)

type SecretObjectProperties

type SecretObjectProperties struct {
	// The name of the secret
	Name string `json:"name"`
	// File name when written to disk.
	Alias string `json:"alias,omitempty"`
	// Encoding format. Default utf-8
	Encoding *SecretEncoding `json:"encoding,omitempty"`
	// Secret version
	Version string `json:"version,omitempty"`
}

SecretObjectProperties represents the secret object for Volume.

type SecretReference added in v0.36.0

type SecretReference struct {
	// Source represents the Secret Store ID of the secret.
	Source string `json:"source"`

	// Key represents the key of the secret.
	Key string `json:"key"`
}

SecretReference represents a reference to a secret.

type SecretStore

type SecretStore struct {
	v1.BaseResource

	// TODO: remove this from CoreRP
	PortableResourceMetadata
	// Properties is the properties of the resource.
	Properties *SecretStoreProperties `json:"properties"`
}

SecretStore represents secret store resource.

func (*SecretStore) ApplyDeploymentOutput

func (s *SecretStore) ApplyDeploymentOutput(do rpv1.DeploymentOutput) error

ApplyDeploymentOutput updates the status of the SecretStore instance with the output resources from the DeploymentOutput object and returns no error.

func (*SecretStore) OutputResources

func (s *SecretStore) OutputResources() []rpv1.OutputResource

OutputResources returns the OutputResources from the SecretStore's Properties.

func (*SecretStore) ResourceMetadata

func (s *SecretStore) ResourceMetadata() *rpv1.BasicResourceProperties

ResourceMetadata returns the BasicResourceProperties of the SecretStore instance.

func (*SecretStore) ResourceTypeName

func (s *SecretStore) ResourceTypeName() string

ResourceTypeName returns the resource type name of the SecretStore instance.

type SecretStoreDataValue

type SecretStoreDataValue struct {
	// Encoding is the encoding type of Value.
	Encoding SecretValueEncoding `json:"encoding,omitempty"`
	// Value is the value of the secret store data.
	Value *string `json:"value,omitempty"`
	// ValueFrom is the value from of the secret store data.
	ValueFrom *SecretStoreDataValueFrom `json:"valueFrom,omitempty"`
}

SecretStoreDataValue represents the value of the secret store data.

type SecretStoreDataValueFrom

type SecretStoreDataValueFrom struct {
	// Name is the name of the secret.
	Name string `json:"name,omitempty"`
	// Version is the version of the secret.
	Version string `json:"version,omitempty"`
}

SecretStoreDataValueFrom represents the secret reference in the secret store.

type SecretStoreListSecrets

type SecretStoreListSecrets struct {
	// Type is the type of the data.
	Type SecretType `json:"type,omitempty"`

	// Data is the data of the secret store.
	Data map[string]*SecretStoreDataValue `json:"data,omitempty"`
}

SecretStoreListSecrets represents listSecret response.

func (*SecretStoreListSecrets) ApplyDeploymentOutput

func (s *SecretStoreListSecrets) ApplyDeploymentOutput(do rpv1.DeploymentOutput) error

ApplyDeploymentOutput applies the deployment output to the SecretStoreListSecrets instance and returns no error.

func (*SecretStoreListSecrets) OutputResources

func (s *SecretStoreListSecrets) OutputResources() []rpv1.OutputResource

OutputResources returns nil for SecretStoreListSecrets.

func (*SecretStoreListSecrets) ResourceMetadata

func (s *SecretStoreListSecrets) ResourceMetadata() *rpv1.BasicResourceProperties

ResourceMetadata returns nil for SecretStoreListSecrets.

func (*SecretStoreListSecrets) ResourceTypeName

func (s *SecretStoreListSecrets) ResourceTypeName() string

ResourceTypeName returns the resource type name of the SecretStoreListSecrets struct.

type SecretStoreProperties

type SecretStoreProperties struct {
	rpv1.BasicResourceProperties

	// Type is the type of the data.
	Type SecretType `json:"type,omitempty"`

	// Data is the data of the secret store.
	Data map[string]*SecretStoreDataValue `json:"data,omitempty"`

	// Resource is the resource id of an external secret store.
	Resource string `json:"resource,omitempty"`
}

SecretStoreProperties represents the properties of SecretStore.

type SecretType

type SecretType string

SecretType represents the type of a secret.

const (
	// SecretTypeNone is the undefined type.
	SecretTypeNone SecretType = ""
	// SecretTypeGeneric is the generic secret type.
	SecretTypeGeneric SecretType = "generic"
	// SecretTypeCert is the certificate secret type.
	SecretTypeCert SecretType = "certificate"
	// SecretTypeBasicAuthentication is the basicAuthentication secret type.
	SecretTypeBasicAuthentication SecretType = "basicAuthentication"
	// SecretTypeAzureWorkloadIdentity is the azureWorkloadIdentity secret type.
	SecretTypeAzureWorkloadIdentity SecretType = "azureWorkloadIdentity"
	// SecretTypeAWSIRSA is the awsIRSA secret type.
	SecretTypeAWSIRSA SecretType = "awsIRSA"
)

type SecretValueEncoding

type SecretValueEncoding string

SecretValueEncoding is the encoding type.

const (
	// SecretValueEncodingRaw is the raw encoding type of value.
	SecretValueEncodingNone SecretValueEncoding = ""
	// SecretValueEncodingRaw is the raw encoding type of value.
	SecretValueEncodingRaw SecretValueEncoding = "raw"
	// SecretValueEncodingBase64 is the base64 encoding type of value.
	SecretValueEncodingBase64 SecretValueEncoding = "base64"
)

type TCPHealthProbeProperties

type TCPHealthProbeProperties struct {
	HealthProbeBase
	ContainerPort int32 `json:"containerPort,omitempty"`
}

TCPHealthProbeProperties - Specifies the properties for readiness/liveness probe using TCP

type TerraformConfigProperties added in v0.31.0

type TerraformConfigProperties struct {
	// Authentication information used to access private Terraform module sources. Supported module sources: Git.
	Authentication AuthConfig `json:"authentication,omitempty"`

	// Providers specifies the Terraform provider configurations. Controls how Terraform interacts with cloud providers, SaaS providers, and other APIs: https://developer.hashicorp.com/terraform/language/providers/configuration.// Providers specifies the Terraform provider configurations.
	Providers map[string][]ProviderConfigProperties `json:"providers,omitempty"`
}

TerraformConfigProperties - Configuration for Terraform Recipes. Controls how Terraform plans and applies templates as part of Recipe deployment.

type VolumeBase

type VolumeBase struct {
	MountPath string `json:"mountPath,omitempty"`
}

Volume - Specifies a volume for a container

type VolumeKind

type VolumeKind string
const (
	Ephemeral  VolumeKind = "ephemeral"
	Persistent VolumeKind = "persistent"
)

type VolumePermission

type VolumePermission string

VolumePermission - Container read/write access to the volume

const (
	VolumePermissionRead  VolumePermission = "read"
	VolumePermissionWrite VolumePermission = "write"
)

type VolumeProperties

type VolumeProperties struct {
	Kind       VolumeKind        `json:"kind,omitempty"`
	Ephemeral  *EphemeralVolume  `json:"ephemeralVolume,omitempty"`
	Persistent *PersistentVolume `json:"persistentVolume,omitempty"`
}

VolumeProperties - Specifies a volume for a container

type VolumeResource

type VolumeResource struct {
	v1.BaseResource

	// TODO: remove this from CoreRP
	PortableResourceMetadata

	// Properties is the properties of the resource.
	Properties VolumeResourceProperties `json:"properties"`
}

VolumeResource represents VolumeResource resource.

func (*VolumeResource) ApplyDeploymentOutput

func (h *VolumeResource) ApplyDeploymentOutput(do rpv1.DeploymentOutput) error

ApplyDeploymentOutput updates the VolumeResource's Properties, ComputedValues and SecretValues with the DeploymentOutput's DeployedOutputResources, ComputedValues and SecretValues respectively.

func (*VolumeResource) OutputResources

func (h *VolumeResource) OutputResources() []rpv1.OutputResource

OutputResources returns the OutputResources from the VolumeResource's Properties.

func (*VolumeResource) ResourceMetadata

func (h *VolumeResource) ResourceMetadata() *rpv1.BasicResourceProperties

ResourceMetadata returns the BasicResourceProperties of the VolumeResource instance.

func (*VolumeResource) ResourceTypeName

func (h *VolumeResource) ResourceTypeName() string

ResourceTypeName returns the type of VolumeResource.

type VolumeResourceProperties

type VolumeResourceProperties struct {
	rpv1.BasicResourceProperties
	// Kind represents the type of Volume resource.
	Kind string `json:"kind,omitempty"`
	// AzureKeyVault represents Azure Keyvault volume properties
	AzureKeyVault *AzureKeyVaultVolumeProperties `json:"azureKeyVault,omitempty"`
}

VolumeResourceProperties represents the properties of VolumeResource.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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