crossplane-provider-yc

module
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2025 License: Apache-2.0

README

Yandex Cloud Crossplane Provider

crossplane-provider-yc is a Crossplane provider that is built using Upjet code generation tools and exposes XRM-conformant managed resources for Yandex Cloud.

Getting Started

Install crossplane-provider-yc

Install crossplane:

kubectl create namespace crossplane-system

helm repo add crossplane-stable https://charts.crossplane.io/stable
helm repo update

helm install crossplane --namespace crossplane-system crossplane-stable/crossplane 

Check crossplane status:

helm list -n crossplane-system

kubectl get all -n crossplane-system

Install crossplane CLI:

curl -sL https://raw.githubusercontent.com/crossplane/crossplane/master/install.sh | sh && \
sudo mv crossplane $(dirname $(which kubectl))

Install the provider by using the following command after changing tag to the latest release:

crossplane xpkg install provider xpkg.upbound.io/yandexcloud/crossplane-provider-yc:v0.4.1
Setup ProviderConfig

Create service account:

yc iam service-account create --name <service-account>

Add roles to this service account:

yc resource-manager folder add-access-binding <folder-id> --role <role>

Request key:

yc iam key create --service-account-id <service-account-id> --output key.json

Create k8s secret:

kubectl create secret generic yc-creds -n "crossplane-system" --from-file=credentials=./key.json

Apply example ProviderConfig:

kubectl apply -f examples/providerconfig/providerconfig.yaml
Update crossplane-provider-yc

Update provider version on new tag (e.g. v0.4.1):

kubectl crossplane update provider crossplane-provider-yc v0.4.1

Useful things

Reconcile existing resources:

Add existing resource id metadata.annotations["crossplane.io/external-name"]

metadata:
  annotations:
    crossplane.io/external-name: <cloud-resource-id>

To avoid making changes to an existing resouce that needs to be references (folder, subnet, etc.), add spec.managementPolicy: ObserveOnly

spec:
  managementPolicy: ObserveOnly
Do not delete external resource with kubectl delete

Add spec.deletionPolicy: Orphan

spec:
  deletionPolicy: Orphan
❯ k explain Folder.spec.deletionPolicy
KIND:     Folder
VERSION:  resourcemanager.yandex-cloud.jet.crossplane.io/v1alpha1

FIELD:    deletionPolicy <string>

DESCRIPTION:
     DeletionPolicy specifies what will happen to the underlying external when
     this managed resource is deleted - either "Delete" or "Orphan" the external
     resource.

You can enforce deletionPolicy: Orphan with gatekeeper if you need.

Report a Bug

For filing bugs, suggesting improvements, or requesting new features, please open an issue.

Directories

Path Synopsis
Package apis contains Kubernetes API for the provider.
Package apis contains Kubernetes API for the provider.
alb/v1alpha1
Package v1alpha1 contains the alb resources of the yandex-cloud jet provider.
Package v1alpha1 contains the alb resources of the yandex-cloud jet provider.
cdn/v1alpha1
+kubebuilder:object:generate=true +groupName=cdn.yandex-cloud.jet.crossplane.io +versionName=v1alpha1
+kubebuilder:object:generate=true +groupName=cdn.yandex-cloud.jet.crossplane.io +versionName=v1alpha1
compute/v1alpha1
Package v1alpha1 contains the compute resources of the yandex-cloud jet provider.
Package v1alpha1 contains the compute resources of the yandex-cloud jet provider.
container/v1alpha1
Package v1alpha1 contains the container resources of the yandex-cloud jet provider.
Package v1alpha1 contains the container resources of the yandex-cloud jet provider.
datatransfer/v1alpha1
Package v1alpha1 contains the datatransfer resources of the yandex-cloud jet provider.
Package v1alpha1 contains the datatransfer resources of the yandex-cloud jet provider.
dns/v1alpha1
Package v1alpha1 contains the dns resources of the yandex-cloud jet provider.
Package v1alpha1 contains the dns resources of the yandex-cloud jet provider.
iam/v1alpha1
Package v1alpha1 contains the iam resources of the yandex-cloud jet provider.
Package v1alpha1 contains the iam resources of the yandex-cloud jet provider.
kms/v1alpha1
Package v1alpha1 contains the kms resources of the yandex-cloud jet provider.
Package v1alpha1 contains the kms resources of the yandex-cloud jet provider.
kubernetes/v1alpha1
Package v1alpha1 contains the kubernetes resources of the yandex-cloud jet provider.
Package v1alpha1 contains the kubernetes resources of the yandex-cloud jet provider.
lb/v1alpha1
+kubebuilder:object:generate=true +groupName=lb.yandex-cloud.jet.crossplane.io +versionName=v1alpha1
+kubebuilder:object:generate=true +groupName=lb.yandex-cloud.jet.crossplane.io +versionName=v1alpha1
mdb/v1alpha1
Package v1alpha1 contains the mdb resources of the yandex-cloud jet provider.
Package v1alpha1 contains the mdb resources of the yandex-cloud jet provider.
message/v1alpha1
Package v1alpha1 contains the message resources of the yandex-cloud jet provider.
Package v1alpha1 contains the message resources of the yandex-cloud jet provider.
organizationmanager/v1alpha1
+kubebuilder:object:generate=true +groupName=organizationmanager.yandex-cloud.jet.crossplane.io +versionName=v1alpha1
+kubebuilder:object:generate=true +groupName=organizationmanager.yandex-cloud.jet.crossplane.io +versionName=v1alpha1
resourcemanager/v1alpha1
Package v1alpha1 contains the resourcemanager resources of the yandex-cloud jet provider.
Package v1alpha1 contains the resourcemanager resources of the yandex-cloud jet provider.
storage/v1alpha1
Package v1alpha1 contains the storage resources of the yandex-cloud jet provider.
Package v1alpha1 contains the storage resources of the yandex-cloud jet provider.
v1alpha1
Package v1alpha1 contains the core resources of the yandex-cloud jet provider.
Package v1alpha1 contains the core resources of the yandex-cloud jet provider.
v1beta1
Package v1beta1 contains the core resources of the yc jet provider.
Package v1beta1 contains the core resources of the yc jet provider.
vpc/v1alpha1
Package v1alpha1 contains the vpc resources of the yandex-cloud jet provider.
Package v1alpha1 contains the vpc resources of the yandex-cloud jet provider.
ydb/v1alpha1
Package v1alpha1 contains the ydb resources of the yandex-cloud jet provider.
Package v1alpha1 contains the ydb resources of the yandex-cloud jet provider.
cmd
alb
cdn
dns
iam
kms
mdb
nlb
vpc
ydb
hack
internal

Jump to

Keyboard shortcuts

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