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

Nodepool with template observe fail #13

Closed
dcharbonnier opened this issue Mar 4, 2024 · 5 comments
Closed

Nodepool with template observe fail #13

dcharbonnier opened this issue Mar 4, 2024 · 5 comments
Assignees

Comments

@dcharbonnier
Copy link

dcharbonnier commented Mar 4, 2024

Using 0.37.0

When requesting a Nodepool with a template:

spec:
  forProvider:
    flavorName: b2-15
    kubeIdRef:
      name: k-XXX-ovh
    serviceName: XXX
    maxNodes: 30
    minNodes: 1
    autoscale: true
    monthlyBilled: false
    name: b2-15
    template:
      - metadata:
          - labels:
              type: agents-intensive
        spec:
          - unschedulable: false
            taints:
              - effect: "NoSchedule"
                key: "type"
                value: "agents-intensive"
  providerConfigRef:
    name: ovh-default

Synchronization fail:

conditions:
    - lastTransitionTime: '2024-03-04T18:17:00Z'
      message: >-
        observe failed: cannot run refresh: refresh failed: Missing required
        argument: The argument "annotations" is required, but no definition was
        found.

        Missing required argument: The argument "finalizers" is required, but no
        definition was found.
      reason: ReconcileError
      status: 'False'
      type: Synced
@dcharbonnier
Copy link
Author

Tried with 0.36.1, same issue

@smileisak
Copy link
Member

@dcharbonnier thanks for opening this issue, I'll try to reproduce the issue and let you know. 😃

@dcharbonnier
Copy link
Author

Wonderful, we would like to use OVH cloud service :-)

@smileisak
Copy link
Member

@dcharbonnier I was able to create a nodepool with this specification:

apiVersion: kube.ovh.edixos.io/v1alpha1
kind: NodePool
metadata:
  name: hello-edixos
spec:
  providerConfigRef:
    name: default
  forProvider:
    serviceName: ***
    name: hello-crossplane
    flavorName: b2-7
    desiredNodes: 1
    maxNodes: 1
    minNodes: 1
    monthlyBilled: false
    kubeIdRef:
      name: hello-edixos
    template:
      - metadata:
          - labels:
              type: agents-intensive
            annotations:
              type: agents-intensive
            finalizers:
              - "ovhcloud.com/v1beta1"
              - "ovhcloud.com/v1"
        spec:
          - unschedulable: false
            taints:
              - effect: "NoSchedule"
                key: "type"
                value: "agents-intensive"

Looks like the

Metadata []MetadataInitParameters `json:"metadata,omitempty" tf:"metadata,omitempty"`

is optional from the provider api side, but required value from OVH API. Need to be checked why upjet have generated this api specification like so.

@smileisak smileisak self-assigned this Mar 21, 2024
@dcharbonnier
Copy link
Author

I can confirm, with this specification it works, at least for now I have a solution, thanks

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

No branches or pull requests

2 participants