Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add json schema for values.yaml #30

Merged
merged 5 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/helm-rebuild-deps.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Helm deps
on:
workflow_dispatch:
push:
branches:
- 'main'
paths:
- 'helmchart/otel-add-on/Chart.yaml'
permissions:
contents: read

jobs:
build-helm-deps:
permissions:
contents: write # for peter-evans/create-pull-request to create branch
pull-requests: write # for peter-evans/create-pull-request to create a PR
name: Update Helm Deps
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Rebuild the lock file for chart dependencies
run: |
helm repo add open-telemetry https://open-telemetry.github.io/opentelemetry-helm-charts
helm repo update open-telemetry
pushd ./helmchart/otel-add-on && helm dependency build && popd
- name: Create Pull Request
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5
id: cpr
with:
title: "Update Helm Chart.lock"
branch: ci-helm-deps
delete-branch: true
base: main
signoff: true
token: ${{ secrets.GITHUB_TOKEN }}
body: |
:package: helmchart/otel-add-on/Chart.lock update :package:
### automated change
Running helm dependency build on updated sub-chart versions.
Check the result of e2e tests if latest release of `opentelemetry-collector` didn't break the scaler.
If so, pls revert the change from renovate.

This automated PR was created by [this action](https://github.com/kedify/otel-add-on/actions/runs/${{ github.run_id }}).
- name: Check PR
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" | tee -a "$GITHUB_STEP_SUMMARY"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" | tee -a "$GITHUB_STEP_SUMMARY"
6 changes: 3 additions & 3 deletions helmchart/otel-add-on/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: opentelemetry-collector
repository: https://open-telemetry.github.io/opentelemetry-helm-charts
version: 0.108.0
digest: sha256:96f3eef2ce4a5cc86b5143e735f0b3e65ed43cf48776f93f535328a4379921f3
generated: "2024-10-16T19:37:49.891859+02:00"
version: 0.110.0
digest: sha256:887e770259e440e1feec1570037af95f3cb0da788ac824b57d6f79a8bcfa4481
generated: "2024-11-21T16:37:17.878663+01:00"
2 changes: 1 addition & 1 deletion helmchart/otel-add-on/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ icon: https://raw.githubusercontent.com/kedacore/keda/main/images/keda-logo-500x
dependencies:
- name: opentelemetry-collector
repository: https://open-telemetry.github.io/opentelemetry-helm-charts
version: 0.108.0
version: 0.110.0
condition: opentelemetry-collector.enabled
home: https://github.com/kedify/otel-add-on
sources:
Expand Down
268 changes: 268 additions & 0 deletions helmchart/otel-add-on/values.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,268 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Generated schema for Root",
"type": "object",
"properties": {
"replicaCount": {
"type": "number"
},
"image": {
"type": "object",
"properties": {
"repository": {
"type": "string"
},
"pullPolicy": {
"type": "string"
},
"tag": {
"type": "string"
}
},
"required": [
"repository",
"pullPolicy",
"tag"
]
},
"settings": {
"type": "object",
"properties": {
"metricStoreRetentionSeconds": {
"type": "number"
},
"isActivePollingIntervalMilliseconds": {
"type": "number"
},
"internalMetricsPort": {
"type": "number"
},
"restApiPort": {
"type": "number"
},
"logs": {
"type": "object",
"properties": {
"logLvl": {
"type": "string"
},
"stackTracesLvl": {
"type": "string"
},
"noColor": {
"type": "boolean"
},
"noBanner": {
"type": "boolean"
}
},
"required": [
"logLvl",
"stackTracesLvl",
"noColor",
"noBanner"
]
}
},
"required": [
"metricStoreRetentionSeconds",
"isActivePollingIntervalMilliseconds",
"internalMetricsPort",
"restApiPort",
"logs"
]
},
"asciiArt": {
"type": "boolean"
},
"imagePullSecrets": {
"type": "array",
"items": {}
},
"nameOverride": {
"type": "string"
},
"fullnameOverride": {
"type": "string"
},
"serviceAccount": {
"type": "object",
"properties": {
"create": {
"type": "boolean"
},
"automount": {
"type": "boolean"
},
"annotations": {
"type": "object",
"properties": {},
"required": []
},
"name": {
"type": "string"
}
},
"required": [
"create",
"automount",
"annotations",
"name"
]
},
"podAnnotations": {
"type": "object",
"properties": {},
"required": []
},
"podLabels": {
"type": "object",
"properties": {},
"required": []
},
"podSecurityContext": {
"type": "object",
"properties": {},
"required": []
},
"securityContext": {
"type": "object",
"properties": {
"capabilities": {
"type": "object",
"properties": {
"drop": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"drop"
]
},
"readOnlyRootFilesystem": {
"type": "boolean"
},
"runAsNonRoot": {
"type": "boolean"
},
"runAsUser": {
"type": "number"
}
},
"required": [
"capabilities",
"readOnlyRootFilesystem",
"runAsNonRoot",
"runAsUser"
]
},
"service": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"otlpReceiverPort": {
"type": "number"
},
"kedaExternalScalerPort": {
"type": "number"
}
},
"required": [
"type",
"otlpReceiverPort",
"kedaExternalScalerPort"
]
},
"resources": {
"type": "object",
"properties": {
"limits": {
"type": "object",
"properties": {
"cpu": {
"type": "string"
},
"memory": {
"type": "string"
}
},
"required": [
"cpu",
"memory"
]
},
"requests": {
"type": "object",
"properties": {
"cpu": {
"type": "string"
},
"memory": {
"type": "string"
}
},
"required": [
"cpu",
"memory"
]
}
},
"required": [
"limits",
"requests"
]
},
"volumes": {
"type": "array",
"items": {}
},
"volumeMounts": {
"type": "array",
"items": {}
},
"nodeSelector": {
"type": "object",
"properties": {},
"required": []
},
"tolerations": {
"type": "array",
"items": {}
},
"affinity": {
"type": "object",
"properties": {},
"required": []
},
"opentelemetry-collector": {
"type": "object",
"$ref": "https://raw.githubusercontent.com/open-telemetry/opentelemetry-helm-charts/refs/tags/opentelemetry-collector-0.110.0/charts/opentelemetry-collector/values.schema.json#/properties"
}
},
"required": [
"replicaCount",
"image",
"settings",
"asciiArt",
"imagePullSecrets",
"nameOverride",
"fullnameOverride",
"serviceAccount",
"podAnnotations",
"podLabels",
"podSecurityContext",
"securityContext",
"service",
"resources",
"volumes",
"volumeMounts",
"nodeSelector",
"tolerations",
"affinity"
]
}
Loading
Loading