Minikube kubernetes - (kube-proxy) configmap update compacts text

27 views Asked by At

Issue: editing the Kube-proxy configmap via kubectl directly or applying a new configmap via kubectl apply -f kube-proxy.configmap.yaml causes the configmap to become formatted into a condensed version preventing future edits.

System:

  • minikube: 1.32.0
  • kubectl:
    Client Version: v1.29.1
    Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
    Server Version: v1.28.3
    
  • kube-proxy: image: registry.k8s.io/kube-proxy:v1.28.3

Originally the configmap looked like this:

apiVersion: v1
data:
  config.conf: |-
    apiVersion: kubeproxy.config.k8s.io/v1alpha1
    bindAddress: 0.0.0.0
    bindAddressHardFail: false
    clientConnection:
      acceptContentTypes: ""
      burst: 0
      contentType: ""
      kubeconfig: /var/lib/kube-proxy/kubeconfig.conf
      qps: 0
    clusterCIDR: 10.244.0.0/16
    configSyncPeriod: 0s
    conntrack:
      maxPerCore: 0
      min: null
      tcpCloseWaitTimeout: 0s
      tcpEstablishedTimeout: 0s
    detectLocal:
      bridgeInterface: ""
      interfaceNamePrefix: ""
    detectLocalMode: ""
    enableProfiling: false
    healthzBindAddress: ""
    hostnameOverride: ""
    iptables:
      localhostNodePorts: null
      masqueradeAll: false
      masqueradeBit: null
      minSyncPeriod: 0s
      syncPeriod: 0s
    ipvs:
      excludeCIDRs: null
      minSyncPeriod: 0s
      scheduler: ""
      strictARP: false
      syncPeriod: 0s
      tcpFinTimeout: 0s
      tcpTimeout: 0s
      udpTimeout: 0s
    kind: KubeProxyConfiguration
    logging:
      flushFrequency: 0
      options:
        json:
          infoBufferSize: "0"
      verbosity: 0
    metricsBindAddress: 0.0.0.0:10249
    mode: ""
    nodePortAddresses: null
    oomScoreAdj: null
    portRange: ""
    showHiddenMetricsForVersion: ""
    winkernel:
      enableDSR: false
      forwardHealthCheckVip: false
      networkName: ""
      rootHnsEndpointName: ""
      sourceVip: ""
  kubeconfig.conf: |-
    apiVersion: v1
    kind: Config
    clusters:
    - cluster:
        certificate-authority: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
        server: https://control-plane.minikube.internal:8443
      name: default
    contexts:
    - context:
        cluster: default
        namespace: default
        user: default
      name: default
    current-context: default
    users:
    - name: default
      user:
        tokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
kind: ConfigMap
metadata:
  creationTimestamp: "2024-02-24T10:47:29Z"
  labels:
    app: kube-proxy
  name: kube-proxy
  namespace: kube-system
  resourceVersion: "133439"
  uid: 42a727c1-734f-4e0a-b5c1-7983df26db50

I used the normal process of updated a configmap and now when i edit the configmap again it looks like this:

apiVersion: v1
data:
  config.conf: "apiVersion: kubeproxy.config.k8s.io/v1alpha1\nbindAddress: 0.0.0.0\nbindAddressHardFail:
    false\nclientConnection:\n  acceptContentTypes: \"\"\n  burst: 0\n  contentType:
    \"\"\n  kubeconfig: /var/lib/kube-proxy/kubeconfig.conf\n  qps: 0\nclusterCIDR:
    10.244.0.0/16\nconfigSyncPeriod: 0s\nconntrack:\n  maxPerCore: 0\n  min: null\n
    \ tcpCloseWaitTimeout: 0s\n  tcpEstablishedTimeout: 0s\ndetectLocal:\n  bridgeInterface:
    \"\"\n  interfaceNamePrefix: \"\"\ndetectLocalMode: \"\"\nenableProfiling: false\nhealthzBindAddress:
    \"\"\nhostnameOverride: \"\"\niptables:\n  localhostNodePorts: null\n  masqueradeAll:
    false\n  masqueradeBit: null\n  minSyncPeriod: 0s\n  syncPeriod: 0s\nipvs:\n  excludeCIDRs:
    null\n  minSyncPeriod: 0s\n  scheduler: \"\"\n  strictARP: true \n  syncPeriod:
    0s\n  tcpFinTimeout: 0s\n  tcpTimeout: 0s\n  udpTimeout: 0s\nkind: KubeProxyConfiguration\nlogging:\n
    \ flushFrequency: 0\n  options:\n    json:\n      infoBufferSize: \"0\"\n  verbosity:
    0\nmetricsBindAddress: 0.0.0.0:10249\nmode: ipvs\nnodePortAddresses: null\noomScoreAdj:
    null\nportRange: \"\"\nshowHiddenMetricsForVersion: \"\"\nwinkernel:\n  enableDSR:
    false\n  forwardHealthCheckVip: false\n  networkName: \"\"\n  rootHnsEndpointName:
    \"\"\n  sourceVip: \"\""
  kubeconfig.conf: |-
    apiVersion: v1
    kind: Config
    clusters:
    - cluster:
        certificate-authority: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
        server: https://control-plane.minikube.internal:8443
      name: default
    contexts:
    - context:
        cluster: default
        namespace: default
        user: default
      name: default
    current-context: default
    users:
    - name: default
      user:
        tokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
kind: ConfigMap
metadata:
  creationTimestamp: "2024-02-24T10:47:29Z"
  labels:
    app: kube-proxy
  name: kube-proxy
  namespace: kube-system
  resourceVersion: "143292"
  uid: 42a727c1-734f-4e0a-b5c1-7983df26db50

However when i describe the configmap it looks like the original. Is there an issue with how minikube, kubectl, or an update i am not aware of that is compacting or condensing the configmap?

0

There are 0 answers