Skip to content

Write basic etcd-operator spec #9

Closed

Description

@kvaps

We agreed on the next spec:

---
apiVersion: etcd.aenix.io/v1alpha1
kind: EtcdCluster
metadata:
  name: test
  namespace: ns1
spec:
  replicas: 3
  storage:
    storageClass: local-path
    size: 10Gi
status:
  conditions:
  - lastProbeTime: null
     lastTransitionTime: "2024-03-06T18:39:39Z"
     status: "True"
     type: Initialized
  - lastProbeTime: null
     lastTransitionTime: "2024-03-06T18:39:45Z"
     status: "True"
     type: Ready
  - lastProbeTime: null
     lastTransitionTime: "2024-03-06T18:39:45Z"
     status: "True"
     type: Synchronized

Activity

  1. AlexGluck commented on Mar 12, 2024

    @AlexGluck
    Contributor
    1. Before we implement PodTemplate, i suggest add opt-in image in spec
    2. Solution for storage persistent: false use emptyDir, if not set default value true
    3. Solution for storage value storageClass opt-in, if not set use default storage class
    ---
    apiVersion: etcd.aenix.io/v1alpha1
    kind: EtcdCluster
    metadata:
      name: test
      namespace: ns1
    spec:
      replicas: 3
      image: ""
      persistent: false
      storage:
        size: 10Gi
    status:
      conditions:
      - lastProbeTime: null
         lastTransitionTime: "2024-03-06T18:39:39Z"
         status: "True"
         type: Initialized
      - lastProbeTime: null
         lastTransitionTime: "2024-03-06T18:39:45Z"
         status: "True"
         type: Ready
      - lastProbeTime: null
         lastTransitionTime: "2024-03-06T18:39:45Z"
         status: "True"
         type: Synchronized
    ...
    
  2. sedovandrew commented on Mar 13, 2024

    @sedovandrew
    1. I would suggest specifying the Etc version of the cluster in the spec. By default, the operator will use the latest version of Etc known to him, for example, v3.5.12 at the moment. Also specify the version in status, so that the operator understands which cluster he is servicing.
    2. I didn't see the field for the storage class.

    I suggest adding the following fields:

    spec:
      storage:
        class: storage-class-name  # optional #2
      version: v3.5.12  # optional #1
    status:
      version: v3.5.12  # #1

    Final manifest:

    apiVersion: etcd.aenix.io/v1alpha1
    kind: EtcdCluster
    metadata:
      name: test
      namespace: ns1
    spec:
      replicas: 3
      image: ""
      persistent: false
      storage:
        class: storage-class-name  # optional #2
        size: 10Gi
      version: v3.5.12  # optional #1
    status:
      conditions:
      - lastProbeTime: null
         lastTransitionTime: "2024-03-06T18:39:39Z"
         status: "True"
         type: Initialized
      - lastProbeTime: null
         lastTransitionTime: "2024-03-06T18:39:45Z"
         status: "True"
         type: Ready
      - lastProbeTime: null
         lastTransitionTime: "2024-03-06T18:39:45Z"
         status: "True"
         type: Synchronized
      version: v3.5.12  # #1

    It is also worth considering the list of Etcd versions supported by the operator.

  3. sircthulhu commented on Mar 13, 2024

    @sircthulhu
    Collaborator

    Alex Gluck (@AlexGluck) thanks for your suggestions.
    I think I will include them in my implementation.

    Is there a reason for persistence field to be not in the .spec.storage but .spec?

  4. added this to the v0.0.1 milestone on Mar 13, 2024
  5. moved this from In progress to Done in etcd-operatoron Mar 13, 2024
  6. kvaps commented on Mar 13, 2024

    @kvaps
    MemberAuthor

    Fixed by #15 and #16

  7. AlexGluck commented on Mar 14, 2024

    @AlexGluck
    Contributor

    Is there a reason for persistence field to be not in the .spec.storage but .spec?

    Nope

  8. linked a pull request that will close this issueFix CR api group name #16on Mar 15, 2024
  9. added a commit that references this issue on Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions