Skip to content
This repository was archived by the owner on Jan 20, 2026. It is now read-only.
This repository was archived by the owner on Jan 20, 2026. It is now read-only.

docs(FluentdConfig): instructions for installing without helm produce decoding error #362

@ghost

Description

Describe the bug

Currently it is impossible to follow the instructions for installing without Helm due to an extra tab on .spec in crd.yaml

Reproduction steps

Following the instructions linked above on any Kubernetes cluster should produce the following behavior when executing kubectl apply -f ./crd.yaml:

strict decoding error: unknown field "metadata.spec" for

{
  "apiVersion": "apiextensions.k8s.io/v1",
  "kind": "CustomResourceDefinition",
  "metadata": {
    "annotations": {
      "kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"apiextensions.k8s.io/v1\",\"kind\":\"CustomResourceDefinition\",\"metadata\":{\"annotations\":{},\"name\":\"fluentdconfigs.logs.vdp.vmware.com\",\"spec\":{\"conversion\":{\"strategy\":\"None\"},\"group\":\"logs.vdp.vmware.com\",\"names\":{\"kind\":\"FluentdConfig\",\"listKind\":\"FluentdConfigList\",\"plural\":\"fluentdconfigs\",\"singular\":\"fluentdconfig\"},\"scope\":\"Namespaced\",\"versions\":[{\"name\":\"v1beta1\",\"schema\":{\"openAPIV3Schema\":{\"properties\":{\"spec\":{\"properties\":{\"fluentconf\":{\"type\":\"string\"}},\"type\":\"object\"}},\"type\":\"object\"}},\"served\":true,\"storage\":true}]}}}\n"
    },
    "creationTimestamp": "2023-01-06T20:59:39Z",
    "generation": 1,
    "managedFields": [
      {
        "manager": "config-reloader",
        "operation": "Update",
        "apiVersion": "apiextensions.k8s.io/v1",
        "time": "2023-01-06T20:59:39Z",
        "fieldsType": "FieldsV1",
        "fieldsV1": {
          "f:spec": {
            "f:conversion": {
              ".": {},
              "f:strategy": {}
            },
            "f:group": {},
            "f:names": {
              "f:kind": {},
              "f:listKind": {},
              "f:plural": {},
              "f:singular": {}
            },
            "f:scope": {},
            "f:versions": {}
          }
        }
      },
      {
        "manager": "kube-apiserver",
        "operation": "Update",
        "apiVersion": "apiextensions.k8s.io/v1",
        "time": "2023-01-06T20:59:39Z",
        "fieldsType": "FieldsV1",
        "fieldsV1": {
          "f:status": {
            "f:acceptedNames": {
              "f:kind": {},
              "f:listKind": {},
              "f:plural": {},
              "f:singular": {}
            },
            "f:conditions": {
              "k:{\"type\":\"Established\"}": {
                ".": {},
                "f:lastTransitionTime": {},
                "f:message": {},
                "f:reason": {},
                "f:status": {},
                "f:type": {}
              },
              "k:{\"type\":\"NamesAccepted\"}": {
                ".": {},
                "f:lastTransitionTime": {},
                "f:message": {},
                "f:reason": {},
                "f:status": {},
                "f:type": {}
              }
            }
          }
        },
        "subresource": "status"
      },
      {
        "manager": "kubectl-client-side-apply",
        "operation": "Update",
        "apiVersion": "apiextensions.k8s.io/v1",
        "time": "2023-01-06T21:08:16Z",
        "fieldsType": "FieldsV1",
        "fieldsV1": {
          "f:metadata": {
            "f:annotations": {
              ".": {},
              "f:kubectl.kubernetes.io/last-applied-configuration": {}
            }
          }
        }
      }
    ],
    "name": "fluentdconfigs.logs.vdp.vmware.com",
    "resourceVersion": "65538",
    "spec": {
      "conversion": {
        "strategy": "None"
      },
      "group": "logs.vdp.vmware.com",
      "names": {
        "kind": "FluentdConfig",
        "listKind": "FluentdConfigList",
        "plural": "fluentdconfigs",
        "singular": "fluentdconfig"
      },
      "scope": "Namespaced",
      "versions": [
        {
          "name": "v1beta1",
          "schema": {
            "openAPIV3Schema": {
              "properties": {
                "spec": {
                  "properties": {
                    "fluentconf": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              },
              "type": "object"
            }
          },
          "served": true,
          "storage": true
        }
      ]
    },
    "uid": "ba4a9367-f694-43ec-a512-0e37cf7ac96b"
  },
  "status": {
    "conditions": [
      {
        "type": "NamesAccepted",
        "status": "True",
        "lastTransitionTime": "2023-01-06T20:59:39Z",
        "reason": "NoConflicts",
        "message": "no conflicts found"
      },
      {
        "type": "Established",
        "status": "True",
        "lastTransitionTime": "2023-01-06T20:59:39Z",
        "reason": "InitialNamesAccepted",
        "message": "the initial names have been accepted"
      }
    ],
    "acceptedNames": {
      "plural": "fluentdconfigs",
      "singular": "fluentdconfig",
      "kind": "FluentdConfig",
      "listKind": "FluentdConfigList"
    },
    "storedVersions": [
      "v1beta1"
    ]
  }
}

Expected behavior

$ kubectl apply -f ./crd.yaml 

Warning: resource customresourcedefinitions/fluentdconfigs.logs.vdp.vmware.com is missing the kubectl.kubernetes.io/last-applied-configuration annotation which is required by kubectl apply. kubectl apply should only be used on resources created declaratively by either kubectl create --save-config or kubectl apply. The missing annotation will be patched automatically.
customresourcedefinition.apiextensions.k8s.io/fluentdconfigs.logs.vdp.vmware.com configured

Additional context

Root Cause:
https://github.com/vmware/kube-fluentd-operator/blob/281290e24df05081a113728ea5d3d7a8ff4f5ce7/kubectl/crd.yaml#L6

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions