<p>I'm trying to create a ConfigMap with ArgoCD.</p>
<p>I've created a <code>volumes.yaml</code> file as such</p>
<pre><code>---
apiVersion: v1
kind: ConfigMap
metadata:
  name: persistent-volumes-argo
  labels:
    grafana_dashboard: &quot;1&quot;
    project: &quot;foo&quot;
data:
  kubernetes.json: |
{{ .Files.Get &quot;dashboards/persistent-volumes.json&quot; | indent 4 }}
</code></pre>
<p>But ArgoCD doesn't seem to be able to read the data, the way a standard Helm deployment would.</p>
<p>I've tried adding the data directly into the ConfigMap as such</p>
<p>(Data omitted for brevity)</p>
<pre><code>---
apiVersion: v1
kind: ConfigMap
metadata:
  name: persistent-volumes-argo
  labels:
    grafana_dashboard: &quot;1&quot;
    project: &quot;foo&quot;
data:
  kubernetes.json: |
  {
  &quot;annotations&quot;: {
    &quot;list&quot;: [
      {
        &quot;builtIn&quot;: 1,
        &quot;datasource&quot;: &quot;-- Grafana --&quot;,
        &quot;enable&quot;: true,
        &quot;hide&quot;: true,
        &quot;iconColor&quot;: &quot;rgba(0, 211, 255, 1)&quot;,
        &quot;limit&quot;: 100,
        &quot;name&quot;: &quot;Annotations &amp; Alerts&quot;,
        &quot;showIn&quot;: 0,
        &quot;type&quot;: &quot;dashboard&quot;
      }
    ]
  },
  &quot;editable&quot;: true,
  &quot;gnetId&quot;: 13646,
  &quot;graphTooltip&quot;: 0,
  &quot;iteration&quot;: 1659421503107,
  &quot;links&quot;: [],
  &quot;panels&quot;: [
    {
      &quot;collapsed&quot;: false,
      &quot;datasource&quot;: null,
      &quot;fieldConfig&quot;: {
        &quot;defaults&quot;: {},
        &quot;overrides&quot;: []
      },
      &quot;gridPos&quot;: {
        &quot;h&quot;: 1,
        &quot;w&quot;: 24,
        &quot;x&quot;: 0,
        &quot;y&quot;: 0
      },
      &quot;id&quot;: 26,
      &quot;panels&quot;: [],
      &quot;title&quot;: &quot;Alerts&quot;,
      &quot;type&quot;: &quot;row&quot;
    },
    {
      &quot;datasource&quot;: &quot;$datasource&quot;,
      &quot;fieldConfig&quot;: {
        &quot;defaults&quot;: {
          &quot;color&quot;: {
            &quot;mode&quot;: &quot;thresholds&quot;
          },
          &quot;mappings&quot;: [],
          &quot;noValue&quot;: &quot;--&quot;,
          &quot;thresholds&quot;: {
            &quot;mode&quot;: &quot;absolute&quot;,
            &quot;steps&quot;: [
              {
                &quot;color&quot;: &quot;semi-dark-red&quot;,
                &quot;value&quot;: null
              },
              {
                &quot;color&quot;: &quot;light-green&quot;,
                &quot;value&quot;: -0.0001
              },
              {
                &quot;color&quot;: &quot;semi-dark-red&quot;,
                &quot;value&quot;: 0.0001
              }
            ]
          },
          &quot;unit&quot;: &quot;none&quot;
        },
        &quot;overrides&quot;: []
      },
      &quot;gridPos&quot;: {
        &quot;h&quot;: 4,
        &quot;w&quot;: 8,
        &quot;x&quot;: 0,
        &quot;y&quot;: 1
      },
      &quot;id&quot;: 21,
      &quot;options&quot;: {
        &quot;colorMode&quot;: &quot;background&quot;,
        &quot;graphMode&quot;: &quot;area&quot;,
        &quot;justifyMode&quot;: &quot;auto&quot;,
        &quot;orientation&quot;: &quot;auto&quot;,
        &quot;reduceOptions&quot;: {
          &quot;calcs&quot;: [
            &quot;mean&quot;
          ],
          &quot;fields&quot;: &quot;&quot;,
          &quot;values&quot;: false
        },
        &quot;text&quot;: {},
        &quot;textMode&quot;: &quot;auto&quot;
      },
      &quot;pluginVersion&quot;: &quot;8.0.3&quot;,
      &quot;targets&quot;: [
        {
          &quot;expr&quot;: &quot;count (max by (persistentvolumeclaim,namespace) (kubelet_volume_stats_used_bytes{namespace=~\&quot;${k8s_namespace}\&quot;} ) and (max by (persistentvolumeclaim,namespace) (kubelet_volume_stats_used_bytes{namespace=~\&quot;${k8s_namespace}\&quot;} )) / (max by (persistentvolumeclaim,namespace) (kubelet_volume_stats_capacity_bytes{namespace=~\&quot;${k8s_namespace}\&quot;} )) &gt;= (${warning_threshold} / 100)) or vector (0)&quot;,
          &quot;instant&quot;: true,
          &quot;interval&quot;: &quot;&quot;,
          &quot;legendFormat&quot;: &quot;&quot;,
          &quot;refId&quot;: &quot;A&quot;
        }
      ],
      &quot;timeFrom&quot;: null,
      &quot;timeShift&quot;: null,
      &quot;title&quot;: &quot;PVCs Above Warning Threshold&quot;,
      &quot;type&quot;: &quot;stat&quot;
    },
    {
      &quot;datasource&quot;: &quot;$datasource&quot;,
      &quot;fieldConfig&quot;: {
        &quot;defaults&quot;: {
          &quot;color&quot;: {
            &quot;mode&quot;: &quot;thresholds&quot;
          },
          &quot;decimals&quot;: 0,
          &quot;mappings&quot;: [],
          &quot;noValue&quot;: &quot;--&quot;,
          &quot;thresholds&quot;: {
            &quot;mode&quot;: &quot;absolute&quot;,
            &quot;steps&quot;: [
              {
                &quot;color&quot;: &quot;semi-dark-red&quot;,
                &quot;value&quot;: null
              },
              {
                &quot;color&quot;: &quot;light-green&quot;,
                &quot;value&quot;: -0.0001
              },
              {
                &quot;color&quot;: &quot;semi-dark-red&quot;,
                &quot;value&quot;: 0.0001
              }
            ]
          },
          &quot;unit&quot;: &quot;none&quot;
        },
        &quot;overrides&quot;: []
      },
      &quot;gridPos&quot;: {
        &quot;h&quot;: 4,
        &quot;w&quot;: 8,
        &quot;x&quot;: 8,
        &quot;y&quot;: 1
      },
      &quot;id&quot;: 24,
      &quot;options&quot;: {
        &quot;colorMode&quot;: &quot;background&quot;,
        &quot;graphMode&quot;: &quot;area&quot;,
        &quot;justifyMode&quot;: &quot;auto&quot;,
        &quot;orientation&quot;: &quot;auto&quot;,
        &quot;reduceOptions&quot;: {
          &quot;calcs&quot;: [
            &quot;mean&quot;
          ],
          &quot;fields&quot;: &quot;&quot;,
          &quot;values&quot;: false
        },
        &quot;text&quot;: {},
        &quot;textMode&quot;: &quot;auto&quot;
      },
      &quot;pluginVersion&quot;: &quot;8.0.3&quot;,
      &quot;targets&quot;: [
        {
          &quot;expr&quot;: &quot;count((kube_persistentvolumeclaim_status_phase{namespace=~\&quot;${k8s_namespace}\&quot;,phase=\&quot;Pending\&quot;}==1)) or vector(0)&quot;,
          &quot;instant&quot;: true,
          &quot;interval&quot;: &quot;&quot;,
          &quot;legendFormat&quot;: &quot;&quot;,
          &quot;refId&quot;: &quot;A&quot;
        }
      ],
      &quot;timeFrom&quot;: null,
      &quot;timeShift&quot;: null,
      &quot;title&quot;: &quot;PVCs in Pending State&quot;,
      &quot;transformations&quot;: [
        {
          &quot;id&quot;: &quot;organize&quot;,
          &quot;options&quot;: {}
        }
      ],
      &quot;type&quot;: &quot;stat&quot;
    },
    {
      &quot;datasource&quot;: &quot;$datasource&quot;,
      &quot;fieldConfig&quot;: {
        &quot;defaults&quot;: {
          &quot;color&quot;: {
            &quot;mode&quot;: &quot;thresholds&quot;
          },
          &quot;decimals&quot;: 0,
          &quot;mappings&quot;: [],
          &quot;noValue&quot;: &quot;--&quot;,
          &quot;thresholds&quot;: {
            &quot;mode&quot;: &quot;absolute&quot;,
            &quot;steps&quot;: [
              {
                &quot;color&quot;: &quot;semi-dark-red&quot;,
                &quot;value&quot;: null
              },
              {
                &quot;color&quot;: &quot;light-green&quot;,
                &quot;value&quot;: -0.0001
              },
              {
                &quot;color&quot;: &quot;semi-dark-red&quot;,
                &quot;value&quot;: 0.0001
              }
            ]
          },
          &quot;unit&quot;: &quot;none&quot;
        },
        &quot;overrides&quot;: []
      },
      &quot;gridPos&quot;: {
        &quot;h&quot;: 4,
        &quot;w&quot;: 8,
        &quot;x&quot;: 16,
        &quot;y&quot;: 1
      },
      &quot;id&quot;: 23,
      &quot;options&quot;: {
        &quot;colorMode&quot;: &quot;background&quot;,
        &quot;graphMode&quot;: &quot;area&quot;,
        &quot;justifyMode&quot;: &quot;auto&quot;,
        &quot;orientation&quot;: &quot;auto&quot;,
        &quot;reduceOptions&quot;: {
          &quot;calcs&quot;: [
            &quot;mean&quot;
          ],
          &quot;fields&quot;: &quot;&quot;,
          &quot;values&quot;: false
        },
        &quot;text&quot;: {},
        &quot;textMode&quot;: &quot;auto&quot;
      },
      &quot;pluginVersion&quot;: &quot;8.0.3&quot;,
      &quot;targets&quot;: [
        {
          &quot;expr&quot;: &quot;count((kube_persistentvolumeclaim_status_phase{namespace=~\&quot;${k8s_namespace}\&quot;,phase=\&quot;Lost\&quot;}==1)) or vector(0)&quot;,
          &quot;instant&quot;: true,
          &quot;interval&quot;: &quot;&quot;,
          &quot;legendFormat&quot;: &quot;&quot;,
          &quot;refId&quot;: &quot;A&quot;
        }
      ],
      &quot;timeFrom&quot;: null,
      &quot;timeShift&quot;: null,
      &quot;title&quot;: &quot;PVCs in Lost State&quot;,
      &quot;transformations&quot;: [
        {
          &quot;id&quot;: &quot;organize&quot;,
          &quot;options&quot;: {}
        }
      ],
      &quot;type&quot;: &quot;stat&quot;
    },
    {
      &quot;collapsed&quot;: false,
      &quot;datasource&quot;: null,
      &quot;fieldConfig&quot;: {
        &quot;defaults&quot;: {},
        &quot;overrides&quot;: []
      },
      &quot;gridPos&quot;: {
        &quot;h&quot;: 1,
        &quot;w&quot;: 24,
        &quot;x&quot;: 0,
        &quot;y&quot;: 5
      },
      &quot;id&quot;: 17,
      &quot;panels&quot;: [],
      &quot;title&quot;: &quot;Usage statistics&quot;,
      &quot;type&quot;: &quot;row&quot;
    },
    {
      &quot;datasource&quot;: &quot;$datasource&quot;,
      &quot;fieldConfig&quot;: {
        &quot;defaults&quot;: {
          &quot;color&quot;: {
            &quot;mode&quot;: &quot;thresholds&quot;
          },
          &quot;custom&quot;: {
            &quot;align&quot;: null,
            &quot;displayMode&quot;: &quot;auto&quot;,
            &quot;filterable&quot;: false
          },
          &quot;mappings&quot;: [],
          &quot;noValue&quot;: &quot;--&quot;,
          &quot;thresholds&quot;: {
            &quot;mode&quot;: &quot;absolute&quot;,
            &quot;steps&quot;: [
              {
                &quot;color&quot;: &quot;light-green&quot;,
                &quot;value&quot;: null
              }
            ]
          },
          &quot;unit&quot;: &quot;none&quot;
        },
        &quot;overrides&quot;: [
          {
            &quot;matcher&quot;: {
              &quot;id&quot;: &quot;byName&quot;,
              &quot;options&quot;: &quot;Used (%)&quot;
            },
            &quot;properties&quot;: [
              {
                &quot;id&quot;: &quot;custom.displayMode&quot;,
                &quot;value&quot;: &quot;gradient-gauge&quot;
              },
              {
                &quot;id&quot;: &quot;thresholds&quot;,
                &quot;value&quot;: {
                  &quot;mode&quot;: &quot;absolute&quot;,
                  &quot;steps&quot;: [
                    {
                      &quot;color&quot;: &quot;light-green&quot;,
                      &quot;value&quot;: null
                    },
                    {
                      &quot;color&quot;: &quot;semi-dark-yellow&quot;,
                      &quot;value&quot;: 70
                    },
                    {
                      &quot;color&quot;: &quot;dark-red&quot;,
                      &quot;value&quot;: 80
                    }
                  ]
                }
              },
              {
                &quot;id&quot;: &quot;decimals&quot;,
                &quot;value&quot;: 1
              }
            ]
          },
          {
            &quot;matcher&quot;: {
              &quot;id&quot;: &quot;byName&quot;,
              &quot;options&quot;: &quot;Status&quot;
            },
            &quot;properties&quot;: [
              {
                &quot;id&quot;: &quot;custom.displayMode&quot;,
                &quot;value&quot;: &quot;color-background&quot;
              },
              {
                &quot;id&quot;: &quot;mappings&quot;,
                &quot;value&quot;: [
                  {
                    &quot;options&quot;: {
                      &quot;0&quot;: {
                        &quot;text&quot;: &quot;Bound&quot;
                      },
                      &quot;1&quot;: {
                        &quot;text&quot;: &quot;Pending&quot;
                      },
                      &quot;2&quot;: {
                        &quot;text&quot;: &quot;Lost&quot;
                      }
                    },
                    &quot;type&quot;: &quot;value&quot;
                  }
                ]
              },
              {
                &quot;id&quot;: &quot;thresholds&quot;,
                &quot;value&quot;: {
                  &quot;mode&quot;: &quot;absolute&quot;,
                  &quot;steps&quot;: [
                    {
                      &quot;color&quot;: &quot;light-green&quot;,
                      &quot;value&quot;: null
                    },
                    {
                      &quot;color&quot;: &quot;light-green&quot;,
                      &quot;value&quot;: 0
                    },
                    {
                      &quot;color&quot;: &quot;semi-dark-orange&quot;,
                      &quot;value&quot;: 1
                    },
                    {
                      &quot;color&quot;: &quot;semi-dark-red&quot;,
                      &quot;value&quot;: 2
                    }
                  ]
                }
              },
              {
                &quot;id&quot;: &quot;noValue&quot;,
                &quot;value&quot;: &quot;--&quot;
              },
              {
                &quot;id&quot;: &quot;custom.align&quot;,
                &quot;value&quot;: &quot;center&quot;
              }
            ]
          },
          {
            &quot;matcher&quot;: {
              &quot;id&quot;: &quot;byName&quot;,
              &quot;options&quot;: &quot;Namespace&quot;
            },
            &quot;properties&quot;: [
              {
                &quot;id&quot;: &quot;custom.width&quot;,
                &quot;value&quot;: 120
              }
            ]
          },
          {
            &quot;matcher&quot;: {
              &quot;id&quot;: &quot;byName&quot;,
              &quot;options&quot;: &quot;Status&quot;
            },
            &quot;properties&quot;: [
              {
                &quot;id&quot;: &quot;custom.width&quot;,
                &quot;value&quot;: 80
              }
            ]
          },
          {
            &quot;matcher&quot;: {
              &quot;id&quot;: &quot;byName&quot;,
              &quot;options&quot;: &quot;Capacity (GiB)&quot;
            },
            &quot;properties&quot;: [
              {
                &quot;id&quot;: &quot;custom.width&quot;,
                &quot;value&quot;: 120
              }
            ]
          },
          {
            &quot;matcher&quot;: {
              &quot;id&quot;: &quot;byName&quot;,
              &quot;options&quot;: &quot;Used (GiB)&quot;
            },
            &quot;properties&quot;: [
              {
                &quot;id&quot;: &quot;custom.width&quot;,
                &quot;value&quot;: 120
              }
            ]
          },
          {
            &quot;matcher&quot;: {
              &quot;id&quot;: &quot;byName&quot;,
              &quot;options&quot;: &quot;Available (GiB)&quot;
            },
            &quot;properties&quot;: [
              {
                &quot;id&quot;: &quot;custom.width&quot;,
                &quot;value&quot;: 120
              }
            ]
          },
          {
            &quot;matcher&quot;: {
              &quot;id&quot;: &quot;byName&quot;,
              &quot;options&quot;: &quot;StorageClass&quot;
            },
            &quot;properties&quot;: [
              {
                &quot;id&quot;: &quot;custom.width&quot;,
                &quot;value&quot;: 150
              }
            ]
          },
          {
            &quot;matcher&quot;: {
              &quot;id&quot;: &quot;byName&quot;,
              &quot;options&quot;: &quot;PersistentVolumeClaim&quot;
            },
            &quot;properties&quot;: [
              {
                &quot;id&quot;: &quot;custom.width&quot;,
                &quot;value&quot;: 370
              }
            ]
          }
        ]
      },
      &quot;gridPos&quot;: {
        &quot;h&quot;: 12,
        &quot;w&quot;: 24,
        &quot;x&quot;: 0,
        &quot;y&quot;: 6
      },
      &quot;id&quot;: 29,
      &quot;interval&quot;: &quot;&quot;,
      &quot;options&quot;: {
        &quot;frameIndex&quot;: 2,
        &quot;showHeader&quot;: true,
        &quot;sortBy&quot;: [
          {
            &quot;desc&quot;: false,
            &quot;displayName&quot;: &quot;PersistentVolumeClaim&quot;
          }
        ]
      },
      &quot;pluginVersion&quot;: &quot;8.0.3&quot;,
      &quot;targets&quot;: [
        {
          &quot;expr&quot;: &quot; sum by (persistentvolumeclaim,namespace,storageclass,volumename) (kube_persistentvolumeclaim_info{namespace=~\&quot;${k8s_namespace}\&quot;})&quot;,
          &quot;format&quot;: &quot;table&quot;,
          &quot;instant&quot;: true,
          &quot;interval&quot;: &quot;&quot;,
          &quot;legendFormat&quot;: &quot;&quot;,
          &quot;refId&quot;: &quot;A&quot;
        },
        {
          &quot;expr&quot;: &quot;sum by (persistentvolumeclaim) (kubelet_volume_stats_capacity_bytes{namespace=~\&quot;${k8s_namespace}\&quot;}/1024/1024/1024)&quot;,
          &quot;format&quot;: &quot;table&quot;,
          &quot;instant&quot;: true,
          &quot;interval&quot;: &quot;&quot;,
          &quot;legendFormat&quot;: &quot;&quot;,
          &quot;refId&quot;: &quot;B&quot;
        },
        {
          &quot;expr&quot;: &quot;sum by (persistentvolumeclaim) (kubelet_volume_stats_used_bytes{namespace=~\&quot;${k8s_namespace}\&quot;}/1024/1024/1024)&quot;,
          &quot;format&quot;: &quot;table&quot;,
          &quot;instant&quot;: true,
          &quot;interval&quot;: &quot;&quot;,
          &quot;legendFormat&quot;: &quot;&quot;,
          &quot;refId&quot;: &quot;C&quot;
        },
        {
          &quot;expr&quot;: &quot;sum by (persistentvolumeclaim) (kubelet_volume_stats_available_bytes{namespace=~\&quot;${k8s_namespace}\&quot;}/1024/1024/1024)&quot;,
          &quot;format&quot;: &quot;table&quot;,
          &quot;instant&quot;: true,
          &quot;interval&quot;: &quot;&quot;,
          &quot;legendFormat&quot;: &quot;&quot;,
          &quot;refId&quot;: &quot;D&quot;
        },
        {
          &quot;expr&quot;: &quot;sum(kube_persistentvolumeclaim_status_phase{namespace=~\&quot;${k8s_namespace}\&quot;,phase=~\&quot;(Pending|Lost)\&quot;}) by (persistentvolumeclaim) + sum(kube_persistentvolumeclaim_status_phase{namespace=~\&quot;${k8s_namespace}\&quot;,phase=~\&quot;(Lost)\&quot;}) by (persistentvolumeclaim)&quot;,
          &quot;format&quot;: &quot;table&quot;,
          &quot;instant&quot;: true,
          &quot;interval&quot;: &quot;&quot;,
          &quot;legendFormat&quot;: &quot;&quot;,
          &quot;refId&quot;: &quot;E&quot;
        },
        {
          &quot;expr&quot;: &quot;sum by (persistentvolumeclaim) (kubelet_volume_stats_used_bytes{namespace=~\&quot;${k8s_namespace}\&quot;}/kubelet_volume_stats_capacity_bytes{namespace=~\&quot;${k8s_namespace}\&quot;} * 100)&quot;,
          &quot;format&quot;: &quot;table&quot;,
          &quot;instant&quot;: true,
          &quot;interval&quot;: &quot;&quot;,
          &quot;legendFormat&quot;: &quot;&quot;,
          &quot;refId&quot;: &quot;F&quot;
        }
      ],
      &quot;timeFrom&quot;: null,
      &quot;timeShift&quot;: null,
      &quot;title&quot;: &quot;Persistent Volume Claim&quot;,
      &quot;transformations&quot;: [
        {
          &quot;id&quot;: &quot;seriesToColumns&quot;,
          &quot;options&quot;: {
            &quot;byField&quot;: &quot;persistentvolumeclaim&quot;
          }
        },
        {
          &quot;id&quot;: &quot;organize&quot;,
          &quot;options&quot;: {
            &quot;excludeByName&quot;: {
              &quot;Time&quot;: true,
              &quot;Time 1&quot;: true,
              &quot;Time 2&quot;: true,
              &quot;Time 3&quot;: true,
              &quot;Time 4&quot;: true,
              &quot;Time 5&quot;: true,
              &quot;Time 6&quot;: true,
              &quot;Value #A&quot;: true
            },
            &quot;indexByName&quot;: {},
            &quot;renameByName&quot;: {
              &quot;Time 1&quot;: &quot;&quot;,
              &quot;Time 2&quot;: &quot;&quot;,
              &quot;Time 3&quot;: &quot;&quot;,
              &quot;Time 4&quot;: &quot;&quot;,
              &quot;Time 5&quot;: &quot;&quot;,
              &quot;Time 6&quot;: &quot;&quot;,
              &quot;Value #A&quot;: &quot;&quot;,
              &quot;Value #B&quot;: &quot;Capacity (GiB)&quot;,
              &quot;Value #C&quot;: &quot;Used (GiB)&quot;,
              &quot;Value #D&quot;: &quot;Available (GiB)&quot;,
              &quot;Value #E&quot;: &quot;Status&quot;,
              &quot;Value #F&quot;: &quot;Used (%)&quot;,
              &quot;namespace&quot;: &quot;Namespace&quot;,
              &quot;persistentvolumeclaim&quot;: &quot;PersistentVolumeClaim&quot;,
              &quot;storageclass&quot;: &quot;StorageClass&quot;,
              &quot;volumename&quot;: &quot;PhysicalVolume&quot;
            }
          }
        }
      ],
      &quot;type&quot;: &quot;table&quot;
    },
    {
      &quot;datasource&quot;: &quot;$datasource&quot;,
      &quot;fieldConfig&quot;: {
        &quot;defaults&quot;: {
          &quot;custom&quot;: {
            &quot;align&quot;: null,
            &quot;displayMode&quot;: &quot;auto&quot;,
            &quot;filterable&quot;: false
          },
          &quot;mappings&quot;: [],
          &quot;thresholds&quot;: {
            &quot;mode&quot;: &quot;absolute&quot;,
            &quot;steps&quot;: [
              {
                &quot;color&quot;: &quot;green&quot;,
                &quot;value&quot;: null
              }
            ]
          }
        },
        &quot;overrides&quot;: []
      },
      &quot;gridPos&quot;: {
        &quot;h&quot;: 5,
        &quot;w&quot;: 24,
        &quot;x&quot;: 0,
        &quot;y&quot;: 18
      },
      &quot;id&quot;: 7,
      &quot;options&quot;: {
        &quot;showHeader&quot;: true,
        &quot;sortBy&quot;: [
          {
            &quot;desc&quot;: true,
            &quot;displayName&quot;: &quot;Status&quot;
          }
        ]
      },
      &quot;pluginVersion&quot;: &quot;8.0.3&quot;,
      &quot;targets&quot;: [
        {
          &quot;expr&quot;: &quot;kube_storageclass_info&quot;,
          &quot;format&quot;: &quot;table&quot;,
          &quot;interval&quot;: &quot;&quot;,
          &quot;legendFormat&quot;: &quot;&quot;,
          &quot;refId&quot;: &quot;A&quot;
        }
      ],
      &quot;timeFrom&quot;: null,
      &quot;timeShift&quot;: null,
      &quot;title&quot;: &quot;Storage Class&quot;,
      &quot;transformations&quot;: [
        {
          &quot;id&quot;: &quot;organize&quot;,
          &quot;options&quot;: {
            &quot;excludeByName&quot;: {
              &quot;Time&quot;: true,
              &quot;Value&quot;: true,
              &quot;__name__&quot;: true,
              &quot;app_kubernetes_io_instance&quot;: true,
              &quot;app_kubernetes_io_name&quot;: true,
              &quot;instance&quot;: true,
              &quot;job&quot;: true,
              &quot;kubernetes_namespace&quot;: true,
              &quot;kubernetes_pod_name&quot;: true,
              &quot;pod_template_hash&quot;: true
            },
            &quot;indexByName&quot;: {
              &quot;Time&quot;: 1,
              &quot;Value&quot;: 13,
              &quot;__name__&quot;: 2,
              &quot;app_kubernetes_io_instance&quot;: 3,
              &quot;app_kubernetes_io_name&quot;: 4,
              &quot;instance&quot;: 5,
              &quot;job&quot;: 6,
              &quot;kubernetes_namespace&quot;: 7,
              &quot;kubernetes_pod_name&quot;: 8,
              &quot;pod_template_hash&quot;: 9,
              &quot;provisioner&quot;: 10,
              &quot;reclaimPolicy&quot;: 11,
              &quot;storageclass&quot;: 0,
              &quot;volumeBindingMode&quot;: 12
            },
            &quot;renameByName&quot;: {
              &quot;provisioner&quot;: &quot;Provisioner&quot;,
              &quot;reclaimPolicy&quot;: &quot;ReclaimPolicy&quot;,
              &quot;storageclass&quot;: &quot;StorageClass&quot;,
              &quot;volumeBindingMode&quot;: &quot;VolumeBindingMode&quot;
            }
          }
        },
        {
          &quot;id&quot;: &quot;groupBy&quot;,
          &quot;options&quot;: {
            &quot;fields&quot;: {
              &quot;Provisioner&quot;: {
                &quot;aggregations&quot;: [],
                &quot;operation&quot;: &quot;groupby&quot;
              },
              &quot;ReclaimPolicy&quot;: {
                &quot;aggregations&quot;: [],
                &quot;operation&quot;: &quot;groupby&quot;
              },
              &quot;StorageClass&quot;: {
                &quot;aggregations&quot;: [],
                &quot;operation&quot;: &quot;groupby&quot;
              },
              &quot;VolumeBindingMode&quot;: {
                &quot;aggregations&quot;: [],
                &quot;operation&quot;: &quot;groupby&quot;
              }
            }
          }
        }
      ],
      &quot;type&quot;: &quot;table&quot;
    },
    {
      &quot;collapsed&quot;: false,
      &quot;datasource&quot;: null,
      &quot;fieldConfig&quot;: {
        &quot;defaults&quot;: {},
        &quot;overrides&quot;: []
      },
      &quot;gridPos&quot;: {
        &quot;h&quot;: 1,
        &quot;w&quot;: 24,
        &quot;x&quot;: 0,
        &quot;y&quot;: 23
      },
      &quot;id&quot;: 15,
      &quot;panels&quot;: [],
      &quot;title&quot;: &quot;Graphical usage data &quot;,
      &quot;type&quot;: &quot;row&quot;
    },
    {
      &quot;aliasColors&quot;: {},
      &quot;bars&quot;: false,
      &quot;dashLength&quot;: 10,
      &quot;dashes&quot;: false,
      &quot;datasource&quot;: &quot;$datasource&quot;,
      &quot;fill&quot;: 0,
      &quot;fillGradient&quot;: 0,
      &quot;gridPos&quot;: {
        &quot;h&quot;: 12,
        &quot;w&quot;: 24,
        &quot;x&quot;: 0,
        &quot;y&quot;: 24
      },
      &quot;hiddenSeries&quot;: false,
      &quot;id&quot;: 9,
      &quot;legend&quot;: {
        &quot;alignAsTable&quot;: true,
        &quot;avg&quot;: true,
        &quot;current&quot;: true,
        &quot;max&quot;: true,
        &quot;min&quot;: true,
        &quot;rightSide&quot;: true,
        &quot;show&quot;: true,
        &quot;total&quot;: false,
        &quot;values&quot;: true
      },
      &quot;lines&quot;: true,
      &quot;linewidth&quot;: 1,
      &quot;nullPointMode&quot;: &quot;null&quot;,
      &quot;options&quot;: {
        &quot;alertThreshold&quot;: true
      },
      &quot;percentage&quot;: false,
      &quot;pluginVersion&quot;: &quot;8.0.3&quot;,
      &quot;pointradius&quot;: 2,
      &quot;points&quot;: false,
      &quot;renderer&quot;: &quot;flot&quot;,
      &quot;seriesOverrides&quot;: [],
      &quot;spaceLength&quot;: 10,
      &quot;stack&quot;: false,
      &quot;steppedLine&quot;: false,
      &quot;targets&quot;: [
        {
          &quot;expr&quot;: &quot;(max by (persistentvolumeclaim,namespace) (kubelet_volume_stats_used_bytes{namespace=~\&quot;${k8s_namespace}\&quot;}))&quot;,
          &quot;interval&quot;: &quot;&quot;,
          &quot;legendFormat&quot;: &quot;{{namespace}} ({{persistentvolumeclaim}})&quot;,
          &quot;refId&quot;: &quot;A&quot;
        }
      ],
      &quot;thresholds&quot;: [],
      &quot;timeFrom&quot;: null,
      &quot;timeRegions&quot;: [],
      &quot;timeShift&quot;: null,
      &quot;title&quot;: &quot;All Running PVCs Used Bytes&quot;,
      &quot;tooltip&quot;: {
        &quot;shared&quot;: true,
        &quot;sort&quot;: 2,
        &quot;value_type&quot;: &quot;individual&quot;
      },
      &quot;type&quot;: &quot;graph&quot;,
      &quot;xaxis&quot;: {
        &quot;buckets&quot;: null,
        &quot;mode&quot;: &quot;time&quot;,
        &quot;name&quot;: null,
        &quot;show&quot;: true,
        &quot;values&quot;: []
      },
      &quot;yaxes&quot;: [
        {
          &quot;format&quot;: &quot;bytes&quot;,
          &quot;label&quot;: null,
          &quot;logBase&quot;: 1,
          &quot;max&quot;: null,
          &quot;min&quot;: null,
          &quot;show&quot;: true
        },
        {
          &quot;format&quot;: &quot;Date &amp; time&quot;,
          &quot;label&quot;: null,
          &quot;logBase&quot;: 1,
          &quot;max&quot;: null,
          &quot;min&quot;: null,
          &quot;show&quot;: true
        }
      ],
      &quot;yaxis&quot;: {
        &quot;align&quot;: false,
        &quot;alignLevel&quot;: null
      }
    },
    {
      &quot;collapsed&quot;: true,
      &quot;datasource&quot;: null,
      &quot;fieldConfig&quot;: {
        &quot;defaults&quot;: {},
        &quot;overrides&quot;: []
      },
      &quot;gridPos&quot;: {
        &quot;h&quot;: 1,
        &quot;w&quot;: 24,
        &quot;x&quot;: 0,
        &quot;y&quot;: 36
      },
      &quot;id&quot;: 19,
      &quot;panels&quot;: [
        {
          &quot;aliasColors&quot;: {},
          &quot;bars&quot;: false,
          &quot;dashLength&quot;: 10,
          &quot;dashes&quot;: false,
          &quot;datasource&quot;: &quot;$datasource&quot;,
          &quot;fieldConfig&quot;: {
            &quot;defaults&quot;: {
              &quot;custom&quot;: {}
            },
            &quot;overrides&quot;: []
          },
          &quot;fill&quot;: 0,
          &quot;fillGradient&quot;: 0,
          &quot;gridPos&quot;: {
            &quot;h&quot;: 7,
            &quot;w&quot;: 24,
            &quot;x&quot;: 0,
            &quot;y&quot;: 41
          },
          &quot;hiddenSeries&quot;: false,
          &quot;id&quot;: 11,
          &quot;legend&quot;: {
            &quot;alignAsTable&quot;: true,
            &quot;avg&quot;: true,
            &quot;current&quot;: false,
            &quot;max&quot;: false,
            &quot;min&quot;: false,
            &quot;rightSide&quot;: true,
            &quot;show&quot;: true,
            &quot;total&quot;: false,
            &quot;values&quot;: true
          },
          &quot;lines&quot;: true,
          &quot;linewidth&quot;: 1,
          &quot;nullPointMode&quot;: &quot;null&quot;,
          &quot;options&quot;: {
            &quot;alertThreshold&quot;: true
          },
          &quot;percentage&quot;: false,
          &quot;pluginVersion&quot;: &quot;7.2.1&quot;,
          &quot;pointradius&quot;: 2,
          &quot;points&quot;: false,
          &quot;renderer&quot;: &quot;flot&quot;,
          &quot;seriesOverrides&quot;: [],
          &quot;spaceLength&quot;: 10,
          &quot;stack&quot;: false,
          &quot;steppedLine&quot;: false,
          &quot;targets&quot;: [
            {
              &quot;expr&quot;: &quot;rate(kubelet_volume_stats_used_bytes{namespace=~\&quot;${k8s_namespace}\&quot;}[1h])&quot;,
              &quot;instant&quot;: false,
              &quot;interval&quot;: &quot;&quot;,
              &quot;legendFormat&quot;: &quot;{{namespace}} ({{persistentvolumeclaim}})&quot;,
              &quot;refId&quot;: &quot;A&quot;
            }
          ],
          &quot;thresholds&quot;: [],
          &quot;timeFrom&quot;: null,
          &quot;timeRegions&quot;: [],
          &quot;timeShift&quot;: null,
          &quot;title&quot;: &quot;Hourly Volume Usage Rate&quot;,
          &quot;tooltip&quot;: {
            &quot;shared&quot;: true,
            &quot;sort&quot;: 2,
            &quot;value_type&quot;: &quot;individual&quot;
          },
          &quot;type&quot;: &quot;graph&quot;,
          &quot;xaxis&quot;: {
            &quot;buckets&quot;: null,
            &quot;mode&quot;: &quot;time&quot;,
            &quot;name&quot;: null,
            &quot;show&quot;: true,
            &quot;values&quot;: []
          },
          &quot;yaxes&quot;: [
            {
              &quot;format&quot;: &quot;binBps&quot;,
              &quot;label&quot;: null,
              &quot;logBase&quot;: 1,
              &quot;max&quot;: null,
              &quot;min&quot;: null,
              &quot;show&quot;: true
            },
            {
              &quot;format&quot;: &quot;Date &amp; time&quot;,
              &quot;label&quot;: null,
              &quot;logBase&quot;: 1,
              &quot;max&quot;: null,
              &quot;min&quot;: null,
              &quot;show&quot;: true
            }
          ],
          &quot;yaxis&quot;: {
            &quot;align&quot;: false,
            &quot;alignLevel&quot;: null
          }
        },
        {
          &quot;aliasColors&quot;: {},
          &quot;bars&quot;: false,
          &quot;dashLength&quot;: 10,
          &quot;dashes&quot;: false,
          &quot;datasource&quot;: &quot;$datasource&quot;,
          &quot;fieldConfig&quot;: {
            &quot;defaults&quot;: {
              &quot;custom&quot;: {}
            },
            &quot;overrides&quot;: []
          },
          &quot;fill&quot;: 0,
          &quot;fillGradient&quot;: 0,
          &quot;gridPos&quot;: {
            &quot;h&quot;: 7,
            &quot;w&quot;: 24,
            &quot;x&quot;: 0,
            &quot;y&quot;: 48
          },
          &quot;hiddenSeries&quot;: false,
          &quot;id&quot;: 12,
          &quot;legend&quot;: {
            &quot;alignAsTable&quot;: true,
            &quot;avg&quot;: true,
            &quot;current&quot;: false,
            &quot;max&quot;: false,
            &quot;min&quot;: false,
            &quot;rightSide&quot;: true,
            &quot;show&quot;: true,
            &quot;total&quot;: false,
            &quot;values&quot;: true
          },
          &quot;lines&quot;: true,
          &quot;linewidth&quot;: 1,
          &quot;nullPointMode&quot;: &quot;null&quot;,
          &quot;options&quot;: {
            &quot;alertThreshold&quot;: true
          },
          &quot;percentage&quot;: false,
          &quot;pluginVersion&quot;: &quot;7.2.1&quot;,
          &quot;pointradius&quot;: 2,
          &quot;points&quot;: false,
          &quot;renderer&quot;: &quot;flot&quot;,
          &quot;seriesOverrides&quot;: [],
          &quot;spaceLength&quot;: 10,
          &quot;stack&quot;: false,
          &quot;steppedLine&quot;: false,
          &quot;targets&quot;: [
            {
              &quot;expr&quot;: &quot;rate(kubelet_volume_stats_used_bytes{namespace=~\&quot;${k8s_namespace}\&quot;}[1d])&quot;,
              &quot;interval&quot;: &quot;&quot;,
              &quot;legendFormat&quot;: &quot;{{namespace}} ({{persistentvolumeclaim}})&quot;,
              &quot;refId&quot;: &quot;A&quot;
            }
          ],
          &quot;thresholds&quot;: [],
          &quot;timeFrom&quot;: null,
          &quot;timeRegions&quot;: [],
          &quot;timeShift&quot;: null,
          &quot;title&quot;: &quot;Daily Volume Usage Rate&quot;,
          &quot;tooltip&quot;: {
            &quot;shared&quot;: true,
            &quot;sort&quot;: 2,
            &quot;value_type&quot;: &quot;individual&quot;
          },
          &quot;type&quot;: &quot;graph&quot;,
          &quot;xaxis&quot;: {
            &quot;buckets&quot;: null,
            &quot;mode&quot;: &quot;time&quot;,
            &quot;name&quot;: null,
            &quot;show&quot;: true,
            &quot;values&quot;: []
          },
          &quot;yaxes&quot;: [
            {
              &quot;format&quot;: &quot;binBps&quot;,
              &quot;label&quot;: null,
              &quot;logBase&quot;: 1,
              &quot;max&quot;: null,
              &quot;min&quot;: null,
              &quot;show&quot;: true
            },
            {
              &quot;format&quot;: &quot;Date &amp; time&quot;,
              &quot;label&quot;: null,
              &quot;logBase&quot;: 1,
              &quot;max&quot;: null,
              &quot;min&quot;: null,
              &quot;show&quot;: true
            }
          ],
          &quot;yaxis&quot;: {
            &quot;align&quot;: false,
            &quot;alignLevel&quot;: null
          }
        },
        {
          &quot;aliasColors&quot;: {},
          &quot;bars&quot;: false,
          &quot;dashLength&quot;: 10,
          &quot;dashes&quot;: false,
          &quot;datasource&quot;: &quot;$datasource&quot;,
          &quot;fieldConfig&quot;: {
            &quot;defaults&quot;: {
              &quot;custom&quot;: {}
            },
            &quot;overrides&quot;: []
          },
          &quot;fill&quot;: 0,
          &quot;fillGradient&quot;: 0,
          &quot;gridPos&quot;: {
            &quot;h&quot;: 7,
            &quot;w&quot;: 24,
            &quot;x&quot;: 0,
            &quot;y&quot;: 55
          },
          &quot;hiddenSeries&quot;: false,
          &quot;id&quot;: 13,
          &quot;legend&quot;: {
            &quot;alignAsTable&quot;: true,
            &quot;avg&quot;: true,
            &quot;current&quot;: false,
            &quot;max&quot;: false,
            &quot;min&quot;: false,
            &quot;rightSide&quot;: true,
            &quot;show&quot;: true,
            &quot;total&quot;: false,
            &quot;values&quot;: true
          },
          &quot;lines&quot;: true,
          &quot;linewidth&quot;: 1,
          &quot;nullPointMode&quot;: &quot;null&quot;,
          &quot;options&quot;: {
            &quot;alertThreshold&quot;: true
          }
        }
</code></pre>
<p>But this errors with <code>rpc error: code = FailedPrecondition desc = Failed to unmarshal &quot;volumes.yaml&quot;: &lt;nil&gt;</code></p>
<p>Is there a way to pass in json data when creating a ConfigMap with ArgoCD, either as a template or by dumping the data in the file?</p>

Metro
<p>To create configmap with argocd and helm</p>
<pre><code>apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include &quot;helm-chart.fullname&quot; . }}-configmap
data:
  config.json : |
  {{ toJson .Values.configmap | indent 4 }}
</code></pre>
<p>and the value file should be like this, which is our JSON but converted to YAML</p>
<pre><code>configmap:
  json:
    - rigid
    - better for data interchange
  yaml: 
    - slim and flexible
    - better for configuration
  object:
    key: value
    array:
      - null_value:
      - boolean: true
      - integer: 1
      - alias: &amp;example aliases are like variables
      - alias: *example
  paragraph: &gt;
    Blank lines denote

    paragraph breaks
  content: |-
    Or we
    can auto
    convert line breaks
    to save space
  alias: &amp;foo
    bar: baz
  alias_reuse: *foo 
</code></pre>
<p><a href="https://www.json2yaml.com/" rel="nofollow noreferrer">json2yaml</a></p>
<p>A complete demo app can be found <a href="https://github.com/Adiii717/argocd-demo-app" rel="nofollow noreferrer">here</a></p>
<p>A very quick way to create app with the above configmap and demo app</p>
<pre><code>argocd app create demo-app --repo https://github.com/Adiii717/argocd-demo-app.git --path helm-chart --dest-namespace default --dest-server https://kubernetes.default.svc --helm-set replicaCount=2
</code></pre>
<p><a href="https://i.stack.imgur.com/1Eftq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1Eftq.png" alt="enter image description here" /></a>
Make sure you also set</p>
<pre><code>export ARGOCD_AUTH_TOKEN=&quot;tokeh
export ARGOCD_OPTS=&quot;--grpc-web&quot;
export ARGOCD_SERVER=&quot;argocd.example.com&quot;
</code></pre>
<p>added section for the <a href="https://github.com/Adiii717/argocd-demo-app#configmap-creation" rel="nofollow noreferrer">configmap</a></p>
