Configure deployment targets for a landscape
Create a deployment target to configure a destination for an artifact type in a landscape. The target's spec.artifactType selects its deployer. spec.parameters contains the connection information defined by that deployer. The deployer validates the parameters and reports whether it accepts the target.
The deployer is installed once per Konfidence installation and is shared across all projects and landscapes. For the relationship between artifacts, artifact types, deployers, targets, and landscapes, see the Deployment model.
Prerequisites
- A ready landscape.
- A deployer that supports the artifact type you need. See Choose a deployer.
- The parameter format for that deployer. For the Kubernetes deployer, see Target parameters.
kubectlaccess to read the Landscape and create and readDeploymentTargetresources in the landscape namespace.
Set the names used below:
export PROJECT_NAMESPACE=kden-p-ecommerce-platform
export LANDSCAPE_NAMESPACE=$(kubectl get landscape dev \
--namespace="$PROJECT_NAMESPACE" \
--output=jsonpath='{.status.namespace}')Choose the artifact type
Each artifact declares its artifact type. A landscape needs one ready target for every type its stages deploy. Use the exact type supported by the artifact's deployer. For example, the Kubernetes deployer supports helm.konfidence.cloud and kustomize.konfidence.cloud.
Create the target
Save the following manifest as deployment-target.yaml. Empty parameters select the Kubernetes deployer's local cluster:
apiVersion: konfidence.cloud/v1alpha1
kind: DeploymentTarget
metadata:
name: helm-local
namespace: kden-l-dev
spec:
artifactType: helm.konfidence.cloudReplace kden-l-dev with the value of LANDSCAPE_NAMESPACE, then apply the manifest:
kubectl apply -f deployment-target.yamlVerify the target
The deployer that supports the artifact type validates the target and sets its Ready condition:
kubectl wait deploymenttarget/helm-local \
--namespace="$LANDSCAPE_NAMESPACE" \
--for=condition=Ready \
--timeout=60sThe command returns condition met when the deployer accepts the target parameters. Ready=True indicates acceptance of the parameters by the deployer. It does not guarantee that a future artifact deployment will succeed.
List all targets of the landscape:
kubectl get deploymenttargets --namespace="$LANDSCAPE_NAMESPACE"Troubleshooting
ReadystaysFalse: inspect the condition reason and message for invalid parameters. For the Kubernetes deployer, see Target parameters.- The target has no condition: confirm that a running deployer supports the exact
spec.artifactTypevalue.
Next steps
- Connect artifact registries supplies credentials for private artifacts in this landscape.
- Choose landscape services identifies the runtime services your applications need.
- Create a stage selects a vector to deploy through the prepared landscape's targets.
- Types of artifacts explains artifact types and supported formats.
- DeploymentTarget CRD reference lists all fields.