KubernetesEnvironmentResource
Represents a Kubernetes environment resource that can host application resources.
type KubernetesEnvironmentResource interface { ComputeEnvironmentResource Resource}Properties
DashboardEnabled boolget · setDashboardEnabled() (bool, error)SetDashboardEnabled(value bool) KubernetesEnvironmentResourceDefaultImagePullPolicy stringget · setDefaultImagePullPolicy() (string, error)SetDefaultImagePullPolicy(value string) KubernetesEnvironmentResourceDefaultServiceType stringget · setDefaultServiceType() (string, error)SetDefaultServiceType(value string) KubernetesEnvironmentResourceDefaultStorageClassName *stringget · setDefaultStorageClassName() (*string, error)SetDefaultStorageClassName(value *string) KubernetesEnvironmentResourceDefaultStorageReadWritePolicy stringget · setDefaultStorageReadWritePolicy() (string, error)SetDefaultStorageReadWritePolicy(value string) KubernetesEnvironmentResourceDefaultStorageSize stringget · setDefaultStorageSize() (string, error)SetDefaultStorageSize(value string) KubernetesEnvironmentResourceDefaultStorageType stringget · setDefaultStorageType() (string, error)SetDefaultStorageType(value string) KubernetesEnvironmentResourceKubeConfigPath *stringget · set--kubeconfig to target this file instead of the default ~/.kube/config .KubeConfigPath() (*string, error)SetKubeConfigPath(value *string) KubernetesEnvironmentResourceMethods
AddCertManager( name string, options ...*AddCertManagerOptions,) CertManagerResourceParameters
namestringThe Aspire resource name for the cert-manager installation. Each call adds a uniquely-named resource to the application model, so multiple Kubernetes environments must each pass distinct names.options...*AddCertManagerOptions Optional settings, described under Options.Options
Optional parameters are passed in a trailing options ...*AddCertManagerOptions argument.
ChartVersion *stringThe cert-manager Helm chart version to install. Defaults to a pinned version validated against this Aspire build.Returns
CertManagerResource The resource builder.
Returns a handle; failures surface later via Err().
gateway.networking.k8s.io/v1 Gateway resource and one or more HTTPRoute resources in the Helm chart output at publish time.AddGateway(name string) KubernetesGatewayResourceParameters
namestringThe name of the gateway resource.Returns
KubernetesGatewayResource The resource builder.
Returns a handle; failures surface later via Err().
helm upgrade --install as a pipeline step after the main application Helm chart is deployed.AddHelmChart( name string, chartReference string, chartVersion string,) KubernetesHelmChartResourceParameters
namestringThe name of the Helm chart resource (used as release name and namespace if not overridden).chartReference stringThe Helm chart reference. Can be an OCI registry URL (e.g., oci://quay.io/jetstack/charts/cert-manager ) or a chart name from an added repository.chartVersion stringThe chart version to install.Returns
KubernetesHelmChartResource A resource builder for the Helm chart resource.
Returns a handle; failures surface later via Err().
networking.k8s.io/v1 Ingress resource in the Helm chart output at publish time.AddIngress(name string) KubernetesIngressResourceParameters
namestringThe name of the ingress resource. This is used as the Kubernetes resource name.Returns
KubernetesIngressResource The resource builder.
Returns a handle; failures surface later via Err().
AddNodePool(name string) KubernetesNodePoolResourceParameters
namestringThe name of the node pool. This value is used as the nodeSelector value.Returns
KubernetesNodePoolResource The resource builder.
Returns a handle; failures surface later via Err().
AddPersistentVolume(name string) KubernetesPersistentVolumeResourceParameters
namestringThe name of the persistent volume resource. Used as the generated PVC's metadata.name after lower-casing. To bind a workload using the name-match overload of WithPersistentVolume , add a WithVolume("name", "/path") on the workload using the same name.Returns
KubernetesPersistentVolumeResource A builder for the new Kubernetes.
Returns a handle; failures surface later via Err().
ConfigureDashboard(configure func(obj KubernetesAspireDashboardResource)) KubernetesEnvironmentResourceParameters
configurefunc(obj KubernetesAspireDashboardResource) callbackA method that can be used for customizing the dashboard resource.Returns
KubernetesEnvironmentResource The resource builder.
Returns a handle; failures surface later via Err().
WithDashboard(options ...*WithDashboardOptions) KubernetesEnvironmentResourceParameters
options...*WithDashboardOptions Optional settings, described under Options.Options
Optional parameters are passed in a trailing options ...*WithDashboardOptions argument.
Enabled*boolWhether to enable the dashboard. Default is true.Returns
KubernetesEnvironmentResource The resource builder.
Returns a handle; failures surface later via Err().
WithHelm(options ...*WithHelmOptions) KubernetesEnvironmentResourceParameters
options...*WithHelmOptions Optional settings, described under Options.Options
Optional parameters are passed in a trailing options ...*WithHelmOptions argument.
Configurefunc(obj HelmChartOptions) callbackAn optional callback to configure Helm chart settings such as namespace, release name, and chart version.Returns
KubernetesEnvironmentResource The resource builder.
Returns a handle; failures surface later via Err().
WithProperties(configure func(obj KubernetesEnvironmentResource)) KubernetesEnvironmentResourceParameters
configurefunc(obj KubernetesEnvironmentResource) callbackA method that can be used for customizing the KubernetesEnvironmentResource .Returns
KubernetesEnvironmentResource The resource builder.
Returns a handle; failures surface later via Err().