From 6095c0dcb7001187ac0bade9741d2f83a21d333a Mon Sep 17 00:00:00 2001 From: Tamal Saha Date: Fri, 17 Sep 2021 09:51:44 -0700 Subject: [PATCH 1/2] Add stash-metrics chart Signed-off-by: Tamal Saha --- .github/workflows/ci.yml | 9 + charts/stash-crds/templates/NOTES.txt | 2 +- charts/stash-metrics/.helmignore | 23 ++ charts/stash-metrics/Chart.yaml | 13 + charts/stash-metrics/README.md | 43 +++ ...cs.appscode.com_metricsconfigurations.yaml | 338 ++++++++++++++++++ charts/stash-metrics/doc.yaml | 18 + charts/stash-metrics/templates/NOTES.txt | 3 + .../templates/metrics-user-roles.yaml | 32 ++ .../metricsconfig-backupconfiguration.yaml | 56 +++ .../metricsconfig-backupsession.yaml | 38 ++ .../templates/metricsconfig-repository.yaml | 17 + .../metricsconfig-restoresession.yaml | 44 +++ charts/stash-metrics/values.yaml | 3 + charts/stash/Chart.lock | 10 +- charts/stash/Chart.yaml | 8 + hack/scripts/import-crds.sh | 4 + 17 files changed, 658 insertions(+), 3 deletions(-) create mode 100644 charts/stash-metrics/.helmignore create mode 100644 charts/stash-metrics/Chart.yaml create mode 100644 charts/stash-metrics/README.md create mode 100644 charts/stash-metrics/crds/metrics.appscode.com_metricsconfigurations.yaml create mode 100644 charts/stash-metrics/doc.yaml create mode 100644 charts/stash-metrics/templates/NOTES.txt create mode 100644 charts/stash-metrics/templates/metrics-user-roles.yaml create mode 100644 charts/stash-metrics/templates/metricsconfig-backupconfiguration.yaml create mode 100644 charts/stash-metrics/templates/metricsconfig-backupsession.yaml create mode 100644 charts/stash-metrics/templates/metricsconfig-repository.yaml create mode 100644 charts/stash-metrics/templates/metricsconfig-restoresession.yaml create mode 100644 charts/stash-metrics/values.yaml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c2afcbb04..4d68e9f32 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,6 +40,15 @@ jobs: run: | make ci + - name: Check metrics configuration + run: | + # install metrics-configuration-checker + curl -fsSL -o metrics-configuration-checker https://github.com/kmodules/metrics-configuration-checker/releases/download/v0.0.1/metrics-configuration-checker-linux-amd64 + chmod +x metrics-configuration-checker + sudo mv metrics-configuration-checker /usr/local/bin/metrics-configuration-checker + # check stash-metrics chart + metrics-configuration-checker --content=./charts/stash-metrics/templates/ + kubernetes: name: Kubernetes runs-on: ubuntu-latest diff --git a/charts/stash-crds/templates/NOTES.txt b/charts/stash-crds/templates/NOTES.txt index 3e7d79a56..d12d7f26d 100644 --- a/charts/stash-crds/templates/NOTES.txt +++ b/charts/stash-crds/templates/NOTES.txt @@ -1,3 +1,3 @@ -Get the KubeDB crds by running the following command: +Get the Stash crds by running the following command: kubectl get crds --selector=app.kubernetes.io/name=stash diff --git a/charts/stash-metrics/.helmignore b/charts/stash-metrics/.helmignore new file mode 100644 index 000000000..0e8a0eb36 --- /dev/null +++ b/charts/stash-metrics/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/charts/stash-metrics/Chart.yaml b/charts/stash-metrics/Chart.yaml new file mode 100644 index 000000000..0aaa8e5c3 --- /dev/null +++ b/charts/stash-metrics/Chart.yaml @@ -0,0 +1,13 @@ +apiVersion: v2 +name: stash-metrics +description: Stash State Metrics +type: application +version: v2021.08.02 +appVersion: v2021.08.02 +home: https://stash.run +icon: https://cdn.appscode.com/images/products/stash/stash-community-icon.png +sources: +- https://github.com/stashed +maintainers: +- name: appscode + email: support@appscode.com diff --git a/charts/stash-metrics/README.md b/charts/stash-metrics/README.md new file mode 100644 index 000000000..fa25b4ac4 --- /dev/null +++ b/charts/stash-metrics/README.md @@ -0,0 +1,43 @@ +# Stash Metrics + +[Stash Metrics](https://github.com/stashed) - Stash State Metrics + +## TL;DR; + +```console +$ helm repo add appscode https://charts.appscode.com/stable/ +$ helm repo update +$ helm install stash-metrics appscode/stash-metrics -n kube-system +``` + +## Introduction + +This chart deploys Stash metrics configurations on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. + +## Prerequisites + +- Kubernetes 1.16+ + +## Installing the Chart + +To install the chart with the release name `stash-metrics`: + +```console +$ helm install stash-metrics appscode/stash-metrics -n kube-system +``` + +The command deploys Stash metrics configurations on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation. + +> **Tip**: List all releases using `helm list` + +## Uninstalling the Chart + +To uninstall/delete the `stash-metrics`: + +```console +$ helm delete stash-metrics -n kube-system +``` + +The command removes all the Kubernetes components associated with the chart and deletes the release. + + diff --git a/charts/stash-metrics/crds/metrics.appscode.com_metricsconfigurations.yaml b/charts/stash-metrics/crds/metrics.appscode.com_metricsconfigurations.yaml new file mode 100644 index 000000000..e918f3e6d --- /dev/null +++ b/charts/stash-metrics/crds/metrics.appscode.com_metricsconfigurations.yaml @@ -0,0 +1,338 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + creationTimestamp: null + labels: + app.kubernetes.io/name: metrics + name: metricsconfigurations.metrics.appscode.com +spec: + group: metrics.appscode.com + names: + categories: + - metrics + - appscode + - all + kind: MetricsConfiguration + listKind: MetricsConfigurationList + plural: metricsconfigurations + singular: metricsconfiguration + scope: Cluster + versions: + - additionalPrinterColumns: + - jsonPath: .spec.targetRef.apiVersion + name: APIVersion + type: string + - jsonPath: .spec.targetRef.kind + name: Kind + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: MetricsConfigurationSpec is the spec of MetricsConfiguration + object. + properties: + metrics: + description: List of Metrics configuration for the resource object + defined in TargetRef + items: + description: Metrics contains the configuration of a metric in prometheus + style. + properties: + field: + description: Field defines the metric value path of the manifest + file and the type of that value + properties: + path: + description: 'Path defines the json path of the object. + Example: For deployment spec replica count, the path will + be .spec.replicas' + type: string + type: + description: Type defines the type of the value in the given + Path Type can be "Integer" for integer value like .spec.replicas, + "DateTime" for time stamp value like .metadata.creationTimestamp + "Array" for array field like .spec.containers "String" + for string field like .statue.phase (for pod status) + enum: + - Integer + - DateTime + - Array + - String + type: string + required: + - path + - type + type: object + help: + description: 'Help is used to describe the metrics. Example: + For kube_deployment_spec_replicas, help string can be "Number + of desired pods for a deployment."' + type: string + labels: + description: Labels defines the metric labels as a key-value + pair + items: + description: "Label contains the information of a metric label. + Given labels are always added in the metrics along with + resource name and namespace. Resource's name and namespace + are always added in the labels by default. No configuration + is needed for name and namespace labels. \n Example: kube_pod_info{pod=\"\", + namespace=\"\", host_ip=\"172.18.0.2\", pod_ip=\"10.244.0.14\", + node=\"kind-control-plane\"} 1 In the example pod, namespace, + host_ip, pod_ip, node are labels. pod(resource name) and + namespace are default labels. No configurations is needed + for those. \n To generate others labels, config should be + given in the following way \n labels: - key: host_ip valuePath: + .status.hostIP - key: pod_ip valuePath: .status.podIP + \ - key: node valuePath: .spec.nodeName \n Either Value + or ValuePath must be specified for a Label. If both is specified, + ValuePath is ignored. Note that if a valuePath doesn't exist + for a label key, the label will be ignored." + properties: + key: + description: Key defines the label key + type: string + value: + description: 'Value defines the hard coded label value. + Example: labels: - key: unit value: byte - key: + environment value: production' + type: string + valuePath: + description: 'ValuePath defines the label value path. + Example: To add deployment''s resource version as labels, + labels: - key: version valuePath: .metadata.resourceVersion' + type: string + required: + - key + type: object + type: array + metricValue: + description: "MetricValue defines the configuration to obtain + metric value. \n Metrics must contain either States or MetricValue. + If both are specified, MetricValue will be ignored." + properties: + value: + description: "Value contains the metric value. It is always + equal to 1. It is defined when some information of the + object is collected as labels but there is no specific + metric value. \n Example: For metrics \"kube_pod_info\", + there are some information like host_ip, pod_ip, node + name is collected as labels. As there must be a metric + value, metric value is kept as 1. The metric will look + like `kube_pod_info{host_ip=\"172.18.0.2\", pod_ip=\"10.244.0.14\", + node=\"kind-control-plane\" .....} 1`" + format: double + type: number + valueFromExpression: + description: "ValueFromExpression contains an expression + for the metric value expression can be a function as well. + Parameters is used in the expression string \n Available + expression evaluation functions are: \n int() returns + 1 if the expression is true otherwise 0, example: int(phase + == 'Running') \n percentage(a, b) returns the value of + (a * b%) example: percentage(replicas, maxUnavailable) + \n cpuCores() returns the cpu in unit core example: cpuCores(cpu), + for cpu value 150m, it will return 0.15 \n bytes() returns + the memory size in byte example: bytes(memory), for memory + value 1 ki, it will return 1024 \n unix() returns the + DateTime string into unix format. example: unix(dateTime) + will return the corresponding unix value for the given + dateTime \n in above examples phase, replicas, maxUnavailable, + cpu, memory, dateTime are Parameter's key those values + will come from corresponding Parameter's value \n Some + expression evaluation functions are used for calculating + resource requests and limits. Those functions are stated + here: https://github.com/kmodules/resource-metrics/blob/master/eval.go" + type: string + valueFromPath: + description: "ValueFromPath contains the field path of the + manifest file of a object. ValueFromPath is used when + the metric value is coming from any specific json path + of the object. \n Example: For metrics \"kube_deployment_spec_replicas\", + the metricValue is coming from a specific path .spec.replicas + In this case, valueFromPath: .spec.replicas Some example + of json path: .metadata.observedGeneration, .spec.restartPolicy, + .status.startTime \n Some example of json path which is + coming from an element of an array: .spec.containers[*].image, + .status.containerStatuses[*].restartCount" + type: string + type: object + name: + description: 'Name defines the metrics name. Name should be + in snake case. Example: kube_deployment_spec_replicas' + type: string + params: + description: Params is list of parameters configuration used + in expression evaluation + items: + description: Parameter contains the information of a parameter + used in expression evaluation Parameter should contain an + user defined key and corresponding Value or ValuePath. Either + Value or ValuePath must be specified. If both are specified, + ValuePath is ignored. + properties: + key: + description: Key defines the parameter's key + type: string + value: + description: Value defines user defined parameter's value. + type: string + valuePath: + description: 'ValuePath defines the manifest field path + for the parameter''s value. Example: To add deployment''s + spec replica count as parameter, params: - key: replica valuePath: + .spec.replicas' + type: string + required: + - key + type: object + type: array + states: + description: "States handle metrics with label cardinality. + States specify the possible states for a label and their corresponding + MetricValue configuration. \n Metrics must contain either + States or MetricValue. If both are specified, MetricValue + will be ignored." + properties: + labelKey: + description: 'LabelKey defines an user defined label key + of the label which label cardinality is greater than one. + Example: For metric "kube_pod_status_phase", the LabelKey + can be "phase"' + type: string + values: + description: 'Values contains the list of state values. + The size of the list is always equal to the cardinality + of that label. Example: "kube_pod_statue_phase" metric + has a label "phase" which cardinality is equal to 5. So + Values should have StateValues config for all of them.' + items: + description: StateValues contains the information of a + state value. StateValues is used to define state with + all possible label values and corresponding MetricValue. + properties: + labelValue: + description: 'LabelValue defines the value of the + label. Example: For labelKey "phase" (metric: kube_pod_status_phase + path: .status.phase ) label value can be "Running", + "Succeeded", "Failed", "Unknown" and "Pending"' + type: string + metricValue: + description: MetricValue defines the configuration + of the metric value for the corresponding LabelValue + properties: + value: + description: "Value contains the metric value. + It is always equal to 1. It is defined when + some information of the object is collected + as labels but there is no specific metric value. + \n Example: For metrics \"kube_pod_info\", there + are some information like host_ip, pod_ip, node + name is collected as labels. As there must be + a metric value, metric value is kept as 1. The + metric will look like `kube_pod_info{host_ip=\"172.18.0.2\", + pod_ip=\"10.244.0.14\", node=\"kind-control-plane\" + .....} 1`" + format: double + type: number + valueFromExpression: + description: "ValueFromExpression contains an + expression for the metric value expression can + be a function as well. Parameters is used in + the expression string \n Available expression + evaluation functions are: \n int() returns 1 + if the expression is true otherwise 0, example: + int(phase == 'Running') \n percentage(a, b) + returns the value of (a * b%) example: percentage(replicas, + maxUnavailable) \n cpuCores() returns the cpu + in unit core example: cpuCores(cpu), for cpu + value 150m, it will return 0.15 \n bytes() returns + the memory size in byte example: bytes(memory), + for memory value 1 ki, it will return 1024 \n + unix() returns the DateTime string into unix + format. example: unix(dateTime) will return + the corresponding unix value for the given dateTime + \n in above examples phase, replicas, maxUnavailable, + cpu, memory, dateTime are Parameter's key those + values will come from corresponding Parameter's + value \n Some expression evaluation functions + are used for calculating resource requests and + limits. Those functions are stated here: https://github.com/kmodules/resource-metrics/blob/master/eval.go" + type: string + valueFromPath: + description: "ValueFromPath contains the field + path of the manifest file of a object. ValueFromPath + is used when the metric value is coming from + any specific json path of the object. \n Example: + For metrics \"kube_deployment_spec_replicas\", + the metricValue is coming from a specific path + .spec.replicas In this case, valueFromPath: + .spec.replicas Some example of json path: .metadata.observedGeneration, + .spec.restartPolicy, .status.startTime \n Some + example of json path which is coming from an + element of an array: .spec.containers[*].image, + .status.containerStatuses[*].restartCount" + type: string + type: object + required: + - labelValue + - metricValue + type: object + type: array + required: + - labelKey + - values + type: object + type: + description: Type defines the metrics type. For kubernetes based + object, types can only be "gauge" + enum: + - gauge + type: string + required: + - help + - name + - type + type: object + type: array + targetRef: + description: TargetRef defines the object for which metrics will be + collected + properties: + apiVersion: + description: APIVersion defines the versioned schema of this representation + of an object. + type: string + kind: + description: Kind is a string value representing the REST resource + this object represents. In CamelCase. + type: string + required: + - apiVersion + - kind + type: object + required: + - metrics + - targetRef + type: object + type: object + served: true + storage: true + subresources: {} diff --git a/charts/stash-metrics/doc.yaml b/charts/stash-metrics/doc.yaml new file mode 100644 index 000000000..ca564a37d --- /dev/null +++ b/charts/stash-metrics/doc.yaml @@ -0,0 +1,18 @@ +project: + name: Stash Metrics + shortName: Stash Metrics + url: https://github.com/stashed + description: Stash State Metrics + app: Stash metrics configurations +repository: + url: https://charts.appscode.com/stable/ + name: appscode +chart: + name: stash-metrics + values: -- generate from values file -- + valuesExample: -- generate from values file -- +prerequisites: +- Kubernetes 1.16+ +release: + name: stash-metrics + namespace: kube-system diff --git a/charts/stash-metrics/templates/NOTES.txt b/charts/stash-metrics/templates/NOTES.txt new file mode 100644 index 000000000..d12d7f26d --- /dev/null +++ b/charts/stash-metrics/templates/NOTES.txt @@ -0,0 +1,3 @@ +Get the Stash crds by running the following command: + + kubectl get crds --selector=app.kubernetes.io/name=stash diff --git a/charts/stash-metrics/templates/metrics-user-roles.yaml b/charts/stash-metrics/templates/metrics-user-roles.yaml new file mode 100644 index 000000000..cedfff91c --- /dev/null +++ b/charts/stash-metrics/templates/metrics-user-roles.yaml @@ -0,0 +1,32 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: appscode:metrics:edit + labels: + rbac.authorization.k8s.io/aggregate-to-admin: "true" + rbac.authorization.k8s.io/aggregate-to-edit: "true" + annotations: + "helm.sh/hook": pre-install,pre-upgrade + "helm.sh/hook-delete-policy": before-hook-creation +rules: +- apiGroups: + - metrics.appscode.com + resources: + - "*" + verbs: ["*"] +--- +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: appscode:metrics:view + labels: + rbac.authorization.k8s.io/aggregate-to-view: "true" + annotations: + "helm.sh/hook": pre-install,pre-upgrade + "helm.sh/hook-delete-policy": before-hook-creation +rules: +- apiGroups: + - metrics.appscode.com + resources: + - "*" + verbs: ["get", "list", "watch"] diff --git a/charts/stash-metrics/templates/metricsconfig-backupconfiguration.yaml b/charts/stash-metrics/templates/metricsconfig-backupconfiguration.yaml new file mode 100644 index 000000000..394770c68 --- /dev/null +++ b/charts/stash-metrics/templates/metricsconfig-backupconfiguration.yaml @@ -0,0 +1,56 @@ +apiVersion: metrics.appscode.com/v1alpha1 +kind: MetricsConfiguration +metadata: + name: stash-appscode-com-backupconfiguration +spec: + targetRef: + apiVersion: stash.appscode.com/v1beta1 + kind: BackupConfiguration + metrics: + - name: stash_backupconfiguration_created + help: "Unix creation timestamp of this BackupConfiguration object" + type: gauge + field: + path: .metadata.creationTimestamp + type: DateTime + metricValue: + valueFromPath: .metadata.creationTimestamp + - name: stash_backupconfiguration_info + help: "General information about this BackupConfiguration" + type: gauge + labels: + - key: driver + valuePath: .spec.driver + - key: repository + valuePath: .spec.repository.name + - key: schedule + valuePath: .spec.schedule + - key: target_api_version + valuePath: .spec.target.ref.apiVersion + - key: target_kind + valuePath: .spec.target.ref.kind + - key: target_name + valuePath: .spec.target.ref.name + - key: invoker_kind + value: "BackupConfiguration" + - key: invoker_name + valuePath: .metadata.name + metricValue: + value: 1 + - name: stash_backupconfiguration_conditions + help: "Current conditions of this BackupConfiguration" + type: gauge + field: + path: status.conditions + type: Array + labels: + - key: invoker_kind + value: "BackupConfiguration" + - key: invoker_name + valuePath: .metadata.name + - key: condition + valuePath: .status.conditions[*].type + - key: status + valuePath: .status.conditions[*].status + metricValue: + value: 1 diff --git a/charts/stash-metrics/templates/metricsconfig-backupsession.yaml b/charts/stash-metrics/templates/metricsconfig-backupsession.yaml new file mode 100644 index 000000000..158209539 --- /dev/null +++ b/charts/stash-metrics/templates/metricsconfig-backupsession.yaml @@ -0,0 +1,38 @@ +apiVersion: metrics.appscode.com/v1alpha1 +kind: MetricsConfiguration +metadata: + name: stash-appscode-com-backupsession +spec: + targetRef: + apiVersion: stash.appscode.com/v1beta1 + kind: BackupSession + metrics: + - name: stash_backupsession_created + help: "Unix creation timestamp of this BackupSession" + type: gauge + field: + path: .metadata.creationTimestamp + type: DateTime + labels: + - key: invoker_api_group + valuePath: .spec.invoker.apiGroup + - key: invoker_kind + valuePath: .spec.invoker.kind + - key: invoker_name + valuePath: .spec.invoker.name + metricValue: + valueFromPath: .metadata.creationTimestamp + - name: stash_backupsession_info + help: "General information about BackupSession" + type: gauge + labels: + - key: invoker_api_group + valuePath: .spec.invoker.apiGroup + - key: invoker_kind + valuePath: .spec.invoker.kind + - key: invoker_name + valuePath: .spec.invoker.name + - key: phase + valuePath: .status.phase + metricValue: + value: 1 diff --git a/charts/stash-metrics/templates/metricsconfig-repository.yaml b/charts/stash-metrics/templates/metricsconfig-repository.yaml new file mode 100644 index 000000000..c1eda6445 --- /dev/null +++ b/charts/stash-metrics/templates/metricsconfig-repository.yaml @@ -0,0 +1,17 @@ +apiVersion: metrics.appscode.com/v1alpha1 +kind: MetricsConfiguration +metadata: + name: stash-appscode-com-repository +spec: + targetRef: + apiVersion: stash.appscode.com/v1alpha1 + kind: Repository + metrics: + - name: stash_repository_created + help: "Unix creation timestamp of this Repository" + type: gauge + field: + path: .metadata.creationTimestamp + type: DateTime + metricValue: + valueFromPath: .metadata.creationTimestamp diff --git a/charts/stash-metrics/templates/metricsconfig-restoresession.yaml b/charts/stash-metrics/templates/metricsconfig-restoresession.yaml new file mode 100644 index 000000000..ef4733a68 --- /dev/null +++ b/charts/stash-metrics/templates/metricsconfig-restoresession.yaml @@ -0,0 +1,44 @@ +apiVersion: metrics.appscode.com/v1alpha1 +kind: MetricsConfiguration +metadata: + name: stash-appscode-com-restoresession +spec: + targetRef: + apiVersion: stash.appscode.com/v1beta1 + kind: RestoreSession + metrics: + - name: stash_restoresession_created + help: "Unix creation timestamp of this RestoreSession object" + type: gauge + field: + path: .metadata.creationTimestamp + type: DateTime + labels: + - key: invoker_kind + value: "RestoreSession" + - key: invoker_name + valuePath: .metadata.name + metricValue: + valueFromPath: .metadata.creationTimestamp + - name: stash_restoresession_info + help: "General information about this RestoreSession" + type: gauge + labels: + - key: driver + valuePath: .spec.driver + - key: repository + valuePath: .spec.repository.name + - key: target_api_version + valuePath: .spec.target.ref.apiVersion + - key: target_kind + valuePath: .spec.target.ref.kind + - key: target_name + valuePath: .spec.target.ref.name + - key: invoker_kind + value: "RestoreSession" + - key: invoker_name + valuePath: .metadata.name + - key: phase + valuePath: .status.phase + metricValue: + value: 1 diff --git a/charts/stash-metrics/values.yaml b/charts/stash-metrics/values.yaml new file mode 100644 index 000000000..7253fbcee --- /dev/null +++ b/charts/stash-metrics/values.yaml @@ -0,0 +1,3 @@ +# Default values for stash-metrics. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. diff --git a/charts/stash/Chart.lock b/charts/stash/Chart.lock index 503b1aa1b..4ee56def8 100644 --- a/charts/stash/Chart.lock +++ b/charts/stash/Chart.lock @@ -8,5 +8,11 @@ dependencies: - name: stash-catalog repository: file://../stash-catalog version: v2021.08.02 -digest: sha256:2d93f3754c745d0723a5e97b173603f964984587976fdfc3f78b849905949f89 -generated: "2021-07-31T08:10:43.951844786Z" +- name: stash-catalog + repository: file://../stash-catalog + version: v2021.08.02 +- name: stash-metrics + repository: file://../stash-metrics + version: v2021.08.02 +digest: sha256:495a3436959d0385792255a323d83df9b2f7072aa27f888c81db7bfc7ccee713 +generated: "2021-09-17T09:50:10.202973769-07:00" diff --git a/charts/stash/Chart.yaml b/charts/stash/Chart.yaml index 5c98b08bf..405d9939b 100644 --- a/charts/stash/Chart.yaml +++ b/charts/stash/Chart.yaml @@ -24,3 +24,11 @@ dependencies: repository: file://../stash-catalog version: v2021.08.02 condition: features.enterprise +- name: stash-catalog + repository: file://../stash-catalog + version: v2021.08.02 + condition: features.enterprise +- name: stash-metrics + repository: file://../stash-metrics + version: v2021.08.02 + condition: features.enterprise diff --git a/hack/scripts/import-crds.sh b/hack/scripts/import-crds.sh index 431b015eb..ac597a4eb 100755 --- a/hack/scripts/import-crds.sh +++ b/hack/scripts/import-crds.sh @@ -77,3 +77,7 @@ crd-importer --v=v1 \ --out=. --output-yaml=crds/stash-catalog-crds.yaml \ --gk=Function.stash.appscode.com \ --gk=Task.stash.appscode.com + +crd-importer \ + --input=https://github.com/kmodules/custom-resources/raw/kubernetes-1.21.1/crds/metrics.appscode.com_metricsconfigurations.yaml \ + --out=./charts/stash-metrics/crds From 21105f6d1681d5240a892ab1622f528b2cafb4b5 Mon Sep 17 00:00:00 2001 From: Tamal Saha Date: Mon, 20 Sep 2021 22:36:23 -0700 Subject: [PATCH 2/2] Update metricsconfig-backupconfiguration.yaml Signed-off-by: Tamal Saha --- .../templates/metricsconfig-backupconfiguration.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/stash-metrics/templates/metricsconfig-backupconfiguration.yaml b/charts/stash-metrics/templates/metricsconfig-backupconfiguration.yaml index 394770c68..9ca615cab 100644 --- a/charts/stash-metrics/templates/metricsconfig-backupconfiguration.yaml +++ b/charts/stash-metrics/templates/metricsconfig-backupconfiguration.yaml @@ -41,7 +41,7 @@ spec: help: "Current conditions of this BackupConfiguration" type: gauge field: - path: status.conditions + path: .status.conditions type: Array labels: - key: invoker_kind