Documentation
¶
Index ¶
- Constants
- Variables
- func AddVolumeMounts(vName string, volumes []k8s.SimpleTextVolume, mounts *[]corev1.VolumeMountArgs)
- func CaddyResource(ctx *sdk.Context, stack api.Stack, input api.ResourceInput, ...) (*api.ResourceOutput, error)
- func DirToConfigMapVolumes(dirPath string, mountPathBase string) ([]k8s.SimpleTextVolume, error)
- func EmbedFSToTextVolumes(volumes []k8s.SimpleTextVolume, fs embed.FS, dir string, baseDir string) ([]k8s.SimpleTextVolume, error)
- func HelmMongodbOperator(ctx *sdk.Context, stack api.Stack, input api.ResourceInput, ...) (*api.ResourceOutput, error)
- func HelmMongodbOperatorComputeProcessor(ctx *sdk.Context, stack api.Stack, input api.ResourceInput, ...) (*api.ResourceOutput, error)
- func HelmPostgresOperator(ctx *sdk.Context, stack api.Stack, input api.ResourceInput, ...) (*api.ResourceOutput, error)
- func HelmPostgresOperatorComputeProcessor(ctx *sdk.Context, stack api.Stack, input api.ResourceInput, ...) (*api.ResourceOutput, error)
- func HelmRabbitmqOperator(ctx *sdk.Context, stack api.Stack, input api.ResourceInput, ...) (*api.ResourceOutput, error)
- func HelmRabbitmqOperatorComputeProcessor(ctx *sdk.Context, stack api.Stack, input api.ResourceInput, ...) (*api.ResourceOutput, error)
- func HelmRedisOperator(ctx *sdk.Context, stack api.Stack, input api.ResourceInput, ...) (*api.ResourceOutput, error)
- func HelmRedisOperatorComputeProcessor(ctx *sdk.Context, stack api.Stack, input api.ResourceInput, ...) (*api.ResourceOutput, error)
- func KubeRun(ctx *sdk.Context, stack api.Stack, input api.ResourceInput, ...) (*api.ResourceOutput, error)
- func PatchDeployment(ctx *sdk.Context, args *DeploymentPatchArgs) (*appsv1.DeploymentPatch, error)
- func Provider(ctx *sdk.Context, stack api.Stack, input api.ResourceInput, ...) (*api.ResourceOutput, error)
- func SanitizeK8sName(name string) string
- func ToCaddyConfigExport(clusterName string) string
- func ToClusterName(input api.ResourceInput, resName string) string
- func ToConfigVolumesName(deploymentName string) string
- func ToEnvConfigName(deploymentName string) string
- func ToImagePullSecretName(deploymentName string) string
- func ToIngressIpExport(clusterName string) string
- func ToSecretVolumesName(deploymentName string) string
- type Args
- type BuildArgs
- type CaddyDeployment
- type ContainerImage
- type DatabaseUser
- type DeploymentPatchArgs
- type InitDbUserJobArgs
- type InitUserJob
- type KubeRunOutput
- type MongodbConnectionParams
- type RabbitmqConnectionParams
- type RedisConnectionParams
- type SimpleContainer
- func DeployCaddyService(ctx *sdk.Context, caddy CaddyDeployment, input api.ResourceInput, ...) (*SimpleContainer, error)
- func DeploySimpleContainer(ctx *sdk.Context, args Args, opts ...sdk.ResourceOption) (*SimpleContainer, error)
- func NewSimpleContainer(ctx *sdk.Context, args *SimpleContainerArgs, opts ...sdk.ResourceOption) (*SimpleContainer, error)
- type SimpleContainerArgs
- type SimpleServiceAccount
- type SimpleServiceAccountArgs
Constants ¶
View Source
const ( AppTypeSimpleContainer = "simple-container" AnnotationCaddyfileEntry = "simple-container.com/caddyfile-entry" AnnotationParentStack = "simple-container.com/parent-stack" AnnotationDomain = "simple-container.com/domain" AnnotationPrefix = "simple-container.com/prefix" AnnotationPort = "simple-container.com/port" AnnotationEnv = "simple-container.com/env" LabelAppType = "appType" LabelAppName = "appName" LabelScEnv = "appEnv" )
Variables ¶
View Source
var Caddyconfig embed.FS
Functions ¶
func AddVolumeMounts ¶
func AddVolumeMounts(vName string, volumes []k8s.SimpleTextVolume, mounts *[]corev1.VolumeMountArgs)
AddVolumeMounts adds volume mounts for a given volume name and list of volumes
func CaddyResource ¶
func CaddyResource(ctx *sdk.Context, stack api.Stack, input api.ResourceInput, params pApi.ProvisionParams) (*api.ResourceOutput, error)
func DirToConfigMapVolumes ¶
func DirToConfigMapVolumes(dirPath string, mountPathBase string) ([]k8s.SimpleTextVolume, error)
DirToConfigMapVolumes converts a directory's files to SimpleTextVolume objects
func EmbedFSToTextVolumes ¶
func EmbedFSToTextVolumes(volumes []k8s.SimpleTextVolume, fs embed.FS, dir string, baseDir string) ([]k8s.SimpleTextVolume, error)
func HelmMongodbOperator ¶
func HelmMongodbOperator(ctx *sdk.Context, stack api.Stack, input api.ResourceInput, params pApi.ProvisionParams) (*api.ResourceOutput, error)
func HelmMongodbOperatorComputeProcessor ¶
func HelmMongodbOperatorComputeProcessor(ctx *sdk.Context, stack api.Stack, input api.ResourceInput, collector pApi.ComputeContextCollector, params pApi.ProvisionParams) (*api.ResourceOutput, error)
func HelmPostgresOperator ¶
func HelmPostgresOperator(ctx *sdk.Context, stack api.Stack, input api.ResourceInput, params pApi.ProvisionParams) (*api.ResourceOutput, error)
func HelmPostgresOperatorComputeProcessor ¶
func HelmPostgresOperatorComputeProcessor(ctx *sdk.Context, stack api.Stack, input api.ResourceInput, collector pApi.ComputeContextCollector, params pApi.ProvisionParams) (*api.ResourceOutput, error)
func HelmRabbitmqOperator ¶
func HelmRabbitmqOperator(ctx *sdk.Context, stack api.Stack, input api.ResourceInput, params pApi.ProvisionParams) (*api.ResourceOutput, error)
func HelmRabbitmqOperatorComputeProcessor ¶
func HelmRabbitmqOperatorComputeProcessor(ctx *sdk.Context, stack api.Stack, input api.ResourceInput, collector pApi.ComputeContextCollector, params pApi.ProvisionParams) (*api.ResourceOutput, error)
func HelmRedisOperator ¶
func HelmRedisOperator(ctx *sdk.Context, stack api.Stack, input api.ResourceInput, params pApi.ProvisionParams) (*api.ResourceOutput, error)
func HelmRedisOperatorComputeProcessor ¶
func HelmRedisOperatorComputeProcessor(ctx *sdk.Context, stack api.Stack, input api.ResourceInput, collector pApi.ComputeContextCollector, params pApi.ProvisionParams) (*api.ResourceOutput, error)
func KubeRun ¶
func KubeRun(ctx *sdk.Context, stack api.Stack, input api.ResourceInput, params pApi.ProvisionParams) (*api.ResourceOutput, error)
func PatchDeployment ¶
func PatchDeployment(ctx *sdk.Context, args *DeploymentPatchArgs) (*appsv1.DeploymentPatch, error)
func Provider ¶
func Provider(ctx *sdk.Context, stack api.Stack, input api.ResourceInput, params pApi.ProvisionParams) (*api.ResourceOutput, error)
func SanitizeK8sName ¶
SanitizeK8sName sanitizes a name to comply with Kubernetes RFC 1123 label requirements. RFC 1123 labels must consist of lowercase alphanumeric characters or '-', and must start and end with an alphanumeric character. Regex: [a-z0-9]([-a-z0-9]*[a-z0-9])?
func ToCaddyConfigExport ¶
func ToClusterName ¶
func ToClusterName(input api.ResourceInput, resName string) string
func ToConfigVolumesName ¶
func ToEnvConfigName ¶
func ToImagePullSecretName ¶
func ToIngressIpExport ¶
func ToSecretVolumesName ¶
Types ¶
type Args ¶
type Args struct {
Namespace string
DeploymentName string
Annotations map[string]string
NodeSelector map[string]string
Affinity *k8s.AffinityRules
Tolerations []k8s.Toleration
Input api.ResourceInput
Deployment k8s.DeploymentConfig
Images []*ContainerImage
Params pApi.ProvisionParams
ServiceAccountName *sdk.StringOutput
KubeProvider sdk.ProviderResource
InitContainers []corev1.ContainerArgs
GenerateCaddyfileEntry bool
ServiceType *string
Sidecars []corev1.ContainerArgs
ComputeContext pApi.ComputeContext
SecretVolumes []k8s.SimpleTextVolume
SecretVolumeOutputs []any
SecretEnvs map[string]string
ImagePullSecret *docker.RegistryCredentials
ProvisionIngress bool
UseSSL bool
VPA *k8s.VPAConfig // Vertical Pod Autoscaler configuration
ReadinessProbe *k8s.CloudRunProbe // Global readiness probe configuration
LivenessProbe *k8s.CloudRunProbe // Global liveness probe configuration
}
type BuildArgs ¶
type BuildArgs struct {
RegistryURL string
RegistryUsername *string
RegistryPassword *string
Stack api.Stack
Input api.ResourceInput
Params pApi.ProvisionParams
Deployment k8s.DeploymentConfig
Opts []sdk.ResourceOption
}
type CaddyDeployment ¶
type CaddyDeployment struct {
*k8s.CaddyConfig
ClusterName string
ClusterResource sdk.Resource
CaddyfilePrefixOut sdk.StringOutput // Dynamic Caddyfile prefix for cloud storage (e.g., GCS config from GCP)
// Cloud-specific configuration (following SimpleContainer patterns)
SecretEnvs map[string]string // Secret environment variables (e.g., GOOGLE_APPLICATION_CREDENTIALS=/etc/gcp/credentials.json)
SecretVolumes []k8s.SimpleTextVolume // Secret volumes to mount (e.g., GCP credentials)
SecretVolumeOutputs []any // Pulumi outputs for secret volumes
}
type ContainerImage ¶
type ContainerImage struct {
Container k8s.CloudRunContainer
ImageName sdk.StringOutput
AddOpts []sdk.ResourceOption
}
func BuildAndPushImages ¶
func BuildAndPushImages(ctx *sdk.Context, args BuildArgs) ([]*ContainerImage, error)
type DatabaseUser ¶
type DatabaseUser struct {
Database string
Username string
Password sdk.StringOutput
}
type DeploymentPatchArgs ¶
type DeploymentPatchArgs struct {
PatchName string
ServiceName string
Namespace string
Annotations map[string]sdk.StringOutput
Opts []sdk.ResourceOption
}
type InitDbUserJobArgs ¶
type InitDbUserJobArgs struct {
User DatabaseUser
InstanceName string
RootUser string
RootPassword string
KubeProvider sdk.ProviderResource
Namespace string
Host string
Port string
InitSQL string
Opts []sdk.ResourceOption
}
type InitUserJob ¶
func NewMongodbInitDbUserJob ¶
func NewMongodbInitDbUserJob(ctx *sdk.Context, stackName string, args InitDbUserJobArgs) (*InitUserJob, error)
func NewPostgresInitDbUserJob ¶
func NewPostgresInitDbUserJob(ctx *sdk.Context, stackName string, args InitDbUserJobArgs) (*InitUserJob, error)
type KubeRunOutput ¶
type KubeRunOutput struct {
Images []*ContainerImage
SimpleContainer *SimpleContainer
}
type MongodbConnectionParams ¶
type MongodbConnectionParams struct {
InstanceName string `json:"instanceName"`
Host string `json:"host"`
Port string `json:"port"`
Password string `json:"password"`
Username string `json:"username"`
Database string `json:"database"`
}
func (MongodbConnectionParams) ConnectionString ¶
func (p MongodbConnectionParams) ConnectionString() string
type RabbitmqConnectionParams ¶
type RabbitmqConnectionParams struct {
ConnectionString string `json:"connection_string"`
DefaultUserConf string `json:"default_user.conf"`
Host string `json:"host"`
Password string `json:"password"`
Port string `json:"port"`
Provider string `json:"provider"`
Type string `json:"type"`
Username string `json:"username"`
}
type RedisConnectionParams ¶
type SimpleContainer ¶
type SimpleContainer struct {
sdk.ResourceState
ServicePublicIP sdk.StringOutput `pulumi:"servicePublicIP"`
ServiceName sdk.StringPtrOutput `pulumi:"serviceName"`
Namespace sdk.StringOutput `pulumi:"namespace"`
Port sdk.IntPtrOutput `pulumi:"port"`
CaddyfileEntry sdk.String `pulumi:"caddyfileEntry"`
Service *corev1.Service `pulumi:"service"`
Deployment *v1.Deployment `pulumi:"deployment"`
}
func DeployCaddyService ¶
func DeployCaddyService(ctx *sdk.Context, caddy CaddyDeployment, input api.ResourceInput, params pApi.ProvisionParams, kubeconfig sdk.StringOutput) (*SimpleContainer, error)
func DeploySimpleContainer ¶
func DeploySimpleContainer(ctx *sdk.Context, args Args, opts ...sdk.ResourceOption) (*SimpleContainer, error)
func NewSimpleContainer ¶
func NewSimpleContainer(ctx *sdk.Context, args *SimpleContainerArgs, opts ...sdk.ResourceOption) (*SimpleContainer, error)
type SimpleContainerArgs ¶
type SimpleContainerArgs struct {
// required properties
Namespace string `json:"namespace" yaml:"namespace"`
Service string `json:"service" yaml:"service"`
ScEnv string `json:"scEnv" yaml:"scEnv"`
Domain string `json:"domain" yaml:"domain"`
Prefix string `json:"prefix" yaml:"prefix"`
ProxyKeepPrefix bool `json:"proxyKeepPrefix" yaml:"proxyKeepPrefix"`
Deployment string `json:"deployment" yaml:"deployment"`
ParentStack *string `json:"parentStack" yaml:"parentStack"`
Replicas int `json:"replicas" yaml:"replicas"`
GenerateCaddyfileEntry bool `json:"generateCaddyfileEntry" yaml:"generateCaddyfileEntry"`
KubeProvider sdk.ProviderResource
// optional properties
PodDisruption *k8s.DisruptionBudget `json:"podDisruption" yaml:"podDisruption"`
LbConfig *api.SimpleContainerLBConfig `json:"lbConfig" yaml:"lbConfig"`
SecretEnvs map[string]string `json:"secretEnvs" yaml:"secretEnvs"`
Annotations map[string]string `json:"annotations" yaml:"annotations"`
NodeSelector map[string]string `json:"nodeSelector" yaml:"nodeSelector"`
Affinity *k8s.AffinityRules `json:"affinity" yaml:"affinity"`
IngressContainer *k8s.CloudRunContainer `json:"ingressContainer" yaml:"ingressContainer"`
ServiceType *string `json:"serviceType" yaml:"serviceType"`
ProvisionIngress bool `json:"provisionIngress" yaml:"provisionIngress"`
Headers *k8s.Headers `json:"headers" yaml:"headers"`
Volumes []k8s.SimpleTextVolume `json:"volumes" yaml:"volumes"`
SecretVolumes []k8s.SimpleTextVolume `json:"secretVolumes" yaml:"secretVolumes"`
PersistentVolumes []k8s.PersistentVolume `json:"persistentVolumes" yaml:"persistentVolumes"`
VPA *k8s.VPAConfig `json:"vpa" yaml:"vpa"`
Log logger.Logger
// ...
RollingUpdate *v1.RollingUpdateDeploymentArgs
InitContainers []corev1.ContainerArgs
Containers []corev1.ContainerArgs
SecurityContext *corev1.PodSecurityContextArgs
ServiceAccountName *sdk.StringOutput
Sidecars []corev1.ContainerArgs
SidecarOutputs []corev1.ContainerOutput
InitContainerOutputs []corev1.ContainerOutput
VolumeOutputs []corev1.VolumeOutput
SecretVolumeOutputs []any
ComputeContext pApi.ComputeContext
ImagePullSecret *docker.RegistryCredentials
UseSSL bool
}
type SimpleServiceAccount ¶
type SimpleServiceAccount struct {
sdk.ResourceState
Name sdk.StringOutput
}
func NewSimpleServiceAccount ¶
func NewSimpleServiceAccount(ctx *sdk.Context, name string, args *SimpleServiceAccountArgs, opts ...sdk.ResourceOption) (*SimpleServiceAccount, error)
Source Files
¶
- caddy.go
- compute_proc_mongodb.go
- compute_proc_postgres.go
- compute_proc_rabbitmq.go
- compute_proc_redis.go
- deployment.go
- deployment_patch.go
- helm_operator_mongodb.go
- helm_operator_postgres.go
- helm_operator_rabbitmq.go
- helm_operator_redis.go
- helpers.go
- images_build.go
- init.go
- init_mongo_user_job.go
- init_pg_user_job.go
- kube_run.go
- provider.go
- service_account.go
- simple_container.go
- types.go
- volume.go
Click to show internal directories.
Click to hide internal directories.