Code Monkey home page Code Monkey logo

provider-upjet-yc's Introduction

Provider YandexCloud

provider-upjet-yc is a Crossplane provider that is built using Upjet code generation tools and exposes XRM-conformant managed resources for the YandexCloud API.

Getting Started

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

up ctp provider install xpkg.upbound.io/tages/provider-upjet-yc:v1.3.0

Alternatively, you can use declarative installation:

cat <<EOF | kubectl apply -f -
apiVersion: pkg.crossplane.io/v1
kind: Provider
metadata:
  name: provider-upjet-yc
spec:
  package: xpkg.upbound.io/tages/provider-upjet-yc:v1.3.0
EOF

Notice that in this example Provider resource is referencing ControllerConfig with debug enabled.

You can see the API reference here.

Developing

Run code-generation pipeline:

go run cmd/generator/main.go "$PWD"

Run against a Kubernetes cluster:

make run

Build, push, and install:

make all

Build binary:

make build

Report a Bug

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

provider-upjet-yc's People

Contributors

neko-follower avatar ssch1337 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

neko-follower

provider-upjet-yc's Issues

I can't create ServiceAccountStaticAccessKey - No argument or block type is named "name"

apiVersion: iam.yandex-cloud.upjet.crossplane.io/v1alpha1
kind: ServiceAccountStaticAccessKey
metadata:
  annotations:
    crossplane.io/external-name: sa-static-key
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"iam.yandex-cloud.upjet.crossplane.io/v1alpha1","kind":"ServiceAccountStaticAccessKey","metadata":{"annotations":{},"labels":{"testing.upbound.io/example-name":"sa-static-key"},"name":"sa-static-key"},"spec":{"forProvider":{"description":"static access key for object storage","serviceAccountIdRef":{"name":"sa-crossplane"}},"providerConfigRef":{"name":"provider-upjet-yc"}}}
  creationTimestamp: "2024-02-18T16:02:37Z"
  generation: 3
  labels:
    testing.upbound.io/example-name: sa-static-key
  name: sa-static-key
  resourceVersion: "634052479"
  uid: 6a76de49-d45e-401f-85fd-bbf86a73b757
spec:
  deletionPolicy: Delete
  forProvider:
    description: static access key for object storage
    serviceAccountId: {{MY_ID_SA}}
    serviceAccountIdRef:
      name: sa-crossplane
  initProvider: {}
  managementPolicies:
  - '*'
  providerConfigRef:
    name: provider-upjet-yc
status:
  atProvider: {}
  conditions:
  - lastTransitionTime: "2024-02-18T16:02:38Z"
    message: 'observe failed: cannot run refresh: refresh failed: Extraneous JSON
      object property: No argument or block type is named "name".'
    reason: ReconcileError
    status: "False"
    type: Synced
---

apiVersion: iam.yandex-cloud.upjet.crossplane.io/v1alpha1
kind: ServiceAccountStaticAccessKey
metadata:
  labels:
    testing.upbound.io/example-name: sa-static-key
  name: sa-static-key
spec:
  forProvider:
    description: static access key for object storage
    serviceAccountIdRef:
      name: sa-crossplane
  providerConfigRef:
    name: provider-upjet-yc

---

apiVersion: iam.yandex-cloud.upjet.crossplane.io/v1alpha1
kind: ServiceAccount
metadata:
  annotations:
    meta.upbound.io/example-id: iam/v1alpha1/serviceaccount
  labels:
    testing.upbound.io/example-name: sa-crossplane
  name: sa-crossplane
spec:
  forProvider:
    description: service account for crossplane
    folderId: b1guugseh3jmtmgukcs5
  providerConfigRef:
    name: provider-upjet-yc
  writeConnectionSecretToRef:
    name: upjet-creds
    namespace: crossplane-system

Bucket - using grant (acl conflict)

apiVersion: storage.yandex-cloud.jet.crossplane.io/v1alpha1
kind: Bucket
metadata:
  name: bucket-test
  annotations:
    argocd.argoproj.io/sync-wave: '-1'
spec:
  forProvider:
    accessKeyRef:
      name: upjet-sa-s3-static-key
    secretKeySecretRef:
      name: upjet-bucket-creds
      namespace: crossplane-system
      key: attribute.secret_key
    # acl: private
    grant:
      - id: ajerahbbona80b3knndo
        permissions:
          - FULL_CONTROL
        type: CanonicalUser
    bucket: p-bucket-upjet
  providerConfigRef:
    name: p-upjet-yc
Name:         bucket-test
Namespace:    
Labels:       <none>
Annotations:  argocd.argoproj.io/sync-wave: -1
              crossplane.io/external-create-pending: 2024-01-21T15:38:26Z
              crossplane.io/external-create-succeeded: 2024-01-21T15:38:31Z
              crossplane.io/external-name: p-bucket-upjet
              terrajet.crossplane.io/provider-meta: null
API Version:  storage.yandex-cloud.jet.crossplane.io/v1alpha1
Kind:         Bucket
Metadata:
  Creation Timestamp:  2024-01-21T15:38:26Z
  Finalizers:
    finalizer.managedresource.crossplane.io
  Generation:        3
  Resource Version:  614795105
  UID:               892b392a-12b0-4261-a2dd-42ca29f583c4
Spec:
  Deletion Policy:  Delete
  For Provider:
    Access Key:  YCAJEkF1c1AiCDXf7Ppk4ldM6
    Access Key Ref:
      Name:  upjet-sa-s3-static-key
    Acl:     private
    Anonymous Access Flags:
    Bucket:                 p-bucket-upjet
    Default Storage Class:  STANDARD
    Folder Id:              b1guugseh3jmtmgukcs5
    Grant:
      Id:  ajerahbbona80b3knndo
      Permissions:
        FULL_CONTROL
      Type:  CanonicalUser
    Secret Key Secret Ref:
      Key:        attribute.secret_key
      Name:       upjet-bucket-creds
      Namespace:  crossplane-system
    Versioning:
  Provider Config Ref:
    Name:  provider-upjet-yc
Status:
  At Provider:
    Bucket Domain Name: p-bucket-upjet.storage.yandexcloud.net
    Id:                  p-bucket-upjet
  Conditions:
    Last Transition Time:  2024-01-21T15:38:32Z
    Reason:                Available
    Status:                True
    Type:                  Ready
    Last Transition Time:  2024-01-21T15:38:33Z
    Message:               observe failed: cannot run refresh: refresh failed: Conflicting configuration arguments: "acl": conflicts with grant: File name: main.tf.json
Conflicting configuration arguments: "grant": conflicts with acl: File name: main.tf.json
    Reason:  ReconcileError
    Status:  False
    Type:    Synced
Events:
  Type     Reason                         Age              From                                                                  Message
  ----     ------                         ----             ----                                                                  -------
  Normal   CreatedExternalResource        5s               managed/storage.yandex-cloud.jet.crossplane.io/v1alpha1, kind=bucket  Successfully requested creation of external resource
  Warning  CannotObserveExternalResource  2s (x3 over 3s)  managed/storage.yandex-cloud.jet.crossplane.io/v1alpha1, kind=bucket  cannot run refresh: refresh failed: Conflicting configuration arguments: "acl": conflicts with grant: File name: main.tf.json
Conflicting configuration arguments: "grant": conflicts with acl: File name: main.tf.json

As you can see, I don’t specify the acl parameter, but after sync he sets it himself and talks about a conflict. As a result, the resource hangs.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.