-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ignore missing properties for kubernetes and improve logging (#8)
* Change logging behaviour and add k8s extension Changes: - verbose CLI flag enables debug logging, - print short information on failure, rather than traceback, - print absolute paths for schemas, - add k8s 'x-kubernetes-preserve-unknown-fields' handling. * Fix CI errors and add k8s test --------- Co-authored-by: Julien Mailleret <[email protected]>
- Loading branch information
Showing
4 changed files
with
117 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"description": "Part of VMAgent jsonschema. CRD at https://github.com/VictoriaMetrics/helm-charts/blob/master/charts/victoria-metrics-operator/charts/crds/crds/crd.yaml", | ||
"type": "object", | ||
"properties": { | ||
"extraEnvs": { | ||
"description": "ExtraEnvs that will be passed to the application container", | ||
"items": { | ||
"description": "EnvVar represents an environment variable present in a Container.", | ||
"properties": { | ||
"name": { | ||
"description": "Name of the environment variable. Must be a C_IDENTIFIER.", | ||
"type": "string" | ||
}, | ||
"value": { | ||
"description": "Variable references $(VAR_NAME) are expanded\nusing the previously defined environment variables in the container and\nany service environment variables. If a variable cannot be resolved,\nthe reference in the input string will be unchanged. Double $$ are reduced\nto a single $, which allows for escaping the $(VAR_NAME) syntax: i.e.\n\"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\".\nEscaped references will never be expanded, regardless of whether the variable\nexists or not.\nDefaults to \"\".", | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"name" | ||
], | ||
"type": "object", | ||
"x-kubernetes-preserve-unknown-fields": true, | ||
"additionalProperties": false | ||
}, | ||
"type": "array" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
# yaml-language-server: $schema=./extraEnvs.json | ||
extraEnvs: | ||
- name: GOMEMLIMIT | ||
valueFrom: | ||
resourceFieldRef: | ||
containerName: vmagent | ||
divisor: "1" | ||
resource: limits.memory |