Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(annotations): fix missing annotations & readme / makefile fix typos #6

Merged
merged 1 commit into from
Jul 26, 2021

Conversation

haarchri
Copy link
Member

@haarchri haarchri commented Jul 26, 2021

Signed-off-by: Christopher Haar chhaar30@googlemail.com

Description of your changes

  1. fix missing annotations after apply k8s objects via provider-kubernetes in compositions - removed obj.SetAnnotations
    old behavior:
kubectl describe object.kubernetes.crossplane.io/example
Name:         example
Namespace:    
Labels:       crossplane.io/claim-name=
              crossplane.io/claim-namespace=
              crossplane.io/composite=example
Annotations:  crossplane.io/external-name: example
API Version:  kubernetes.crossplane.io/v1alpha1
Kind:         Object
Metadata:
  Creation Timestamp:  2021-07-25T21:25:43Z
  Finalizers:
    finalizer.managedresource.crossplane.io
  Generate Name:  example-
  Generation:     1
  Owner References:
    API Version:     platform.xxx.intern/v1alpha1
    Controller:      true
    Kind:            Secret
    Name:            example
    UID:             e4490153-2bd7-4111-a590-5f5af02b75b9
  Resource Version:  1768822
  Self Link:         /apis/kubernetes.crossplane.io/v1alpha1/objects/example
  UID:               28587d65-322a-4dd0-a321-c769674a4613
Spec:
  For Provider:
    Manifest:
      API Version:  v1
      Data:
        Team:  xxxx
      Kind:    Secret
      Metadata:
        Annotations:
          abc/autogenerate:  password
          def/type:          string
        Namespace:                                       api-service
      Type:                                              Opaque
  Provider Config Ref:
    Name:  kubernetes-provider
Status:
  At Provider:
    Manifest:
      API Version:  v1
      Data:
        Team:  xxxx
      Kind:    Secret
      Metadata:
        Annotations:
          kubectl.kubernetes.io/last-applied-configuration:  {"apiVersion":"v1","data":{"team":"xxxx"},"kind":"Secret","metadata":{"annotations":{"abc/autogenerate":"password","def/type":"string"},"namespace":"api-service"},"type":"Opaque"}
        Creation Timestamp:                                  2021-07-25T21:25:43Z
        Name:                                                example
        Namespace:                                           api-service
        Resource Version:                                    1768821
        Self Link:                                           /api/v1/namespaces/api-service/secrets/example
        UID:                                                 f0ca82c6-6c0b-4657-979e-4d8f17d01f40
      Type:                                                  Opaque

fixed behavior

kubectl describe object.kubernetes.crossplane.io/example
Name:         example
Namespace:    
Labels:       crossplane.io/claim-name=
              crossplane.io/claim-namespace=
              crossplane.io/composite=example
Annotations:  crossplane.io/external-name: example
API Version:  kubernetes.crossplane.io/v1alpha1
Kind:         Object
Metadata:
  Creation Timestamp:  2021-07-25T21:25:43Z
  Finalizers:
    finalizer.managedresource.crossplane.io
  Generate Name:  example-
  Generation:     1
  Owner References:
    API Version:     platform.xxx.intern/v1alpha1
    Controller:      true
    Kind:            Secret
    Name:            example
    UID:             e4490153-2bd7-4111-a590-5f5af02b75b9
  Resource Version:  1768822
  Self Link:         /apis/kubernetes.crossplane.io/v1alpha1/objects/example
  UID:               28587d65-322a-4dd0-a321-c769674a4613
Spec:
  For Provider:
    Manifest:
      API Version:  v1
      Data:
        Team:  xxxx
      Kind:    Secret
      Metadata:
        Annotations:
          abc/autogenerate:  password
          def/type:          string
        Namespace:                                       api-service
      Type:                                              Opaque
  Provider Config Ref:
    Name:  kubernetes-provider
Status:
  At Provider:
    Manifest:
      API Version:  v1
      Data:
        Team:  xxxx
      Kind:    Secret
      Metadata:
        Annotations:
          abc/autogenerate: password
          def/type: string
          kubectl.kubernetes.io/last-applied-configuration:  {"apiVersion":"v1","data":{"team":"xxxx"},"kind":"Secret","metadata":{"annotations":{"abc/autogenerate":"password","def/type":"string"},"namespace":"api-service"},"type":"Opaque"}
        Creation Timestamp:                                  2021-07-25T21:25:43Z
        Name:                                                example
        Namespace:                                           api-service
        Resource Version:                                    1768821
        Self Link:                                           /api/v1/namespaces/api-service/secrets/example
        UID:                                                 f0ca82c6-6c0b-4657-979e-4d8f17d01f40
      Type:                                                  Opaque
  1. fix Readme apiVersion: pkg.crossplane.io/v1alpha1 to apiVersion: pkg.crossplane.io/v1
  2. fix Makefile include without make submodule -include will silently skip missing files, which allows us to load those files with a target in the Makefile.

I have:

  • Read and followed Crossplane's contribution process.
  • Run make reviewable test to ensure this PR is ready for review.

How has this code been tested

make reviewable

@haarchri haarchri force-pushed the annotations branch 4 times, most recently from 550578c to 87c5e55 Compare July 26, 2021 20:52
Signed-off-by: Christopher Haar <chhaar30@googlemail.com>
@turkenh
Copy link
Collaborator

turkenh commented Jul 26, 2021

Thank you @haarchri!

@turkenh turkenh merged commit 6ca85d5 into crossplane-contrib:main Jul 26, 2021
@haarchri haarchri mentioned this pull request Oct 21, 2021
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants