Skip to content

Commit

Permalink
feat: add pyrra (#459)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrRibeiro authored Oct 11, 2024
1 parent 7fa879a commit 25d8de3
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2099,6 +2099,46 @@
"SSH_KEY": "${{ secrets.DEPLOY_KEY }}"
"if": "steps.filter.outputs.workflows == 'true'"
"run": "make libs/prometheus-operator"
"pyrra":
"name": "Generate pyrra Jsonnet library and docs"
"needs":
- "build"
- "repos"
"runs-on": "ubuntu-latest"
"steps":
- "uses": "actions/checkout@v4"
- "id": "filter"
"uses": "dorny/paths-filter@v3"
"with":
"filters": |
workflows:
- '.github/**'
- 'bin/**'
- 'Dockerfile'
- 'go.mod'
- 'go.sum'
- 'jsonnet/**'
- 'main.go'
- 'Makefile'
- 'pkg/**'
- 'scripts/**'
- 'tf/**'
- 'libs/pyrra/**'
- "if": "steps.filter.outputs.workflows == 'true'"
"uses": "actions/download-artifact@v4"
"with":
"name": "docker-artifact"
"path": "artifacts"
- "if": "steps.filter.outputs.workflows == 'true'"
"run": "make load"
- "env":
"DIFF": "true"
"GEN_COMMIT": "${{ github.ref == 'refs/heads/master' && github.repository == 'jsonnet-libs/k8s' }}"
"GIT_COMMITTER_EMAIL": "[email protected]"
"GIT_COMMITTER_NAME": "jsonnet-libs-bot"
"SSH_KEY": "${{ secrets.DEPLOY_KEY }}"
"if": "steps.filter.outputs.workflows == 'true'"
"run": "make libs/pyrra"
"rabbitmq":
"name": "Generate rabbitmq Jsonnet library and docs"
"needs":
Expand Down Expand Up @@ -2270,6 +2310,7 @@
- "mysql-operator"
- "openshift"
- "prometheus-operator"
- "pyrra"
- "rabbitmq"
- "rabbitmq-messaging-topology-operator"
- "secrets-store-csi-driver"
Expand Down
29 changes: 29 additions & 0 deletions libs/pyrra/config.jsonnet
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
local config = import 'jsonnet/config.jsonnet';

local versions = [
{ output: '0.1', version: '0.1.0' },
{ output: '0.2', version: '0.2.0' },
{ output: '0.3', version: '0.3.4' },
{ output: '0.4', version: '0.4.4' },
{ output: '0.5', version: '0.5.7' },
{ output: '0.6', version: '0.6.4' },
{ output: '0.7', version: '0.7.7' },
];

config.new(
name='pyrra',
specs=[
{
// in version 0.7, the CRD was moved from 'config/crd/bases' into 'examples/kubernetes/manifests/setup'
local url = if std.parseInt(std.split(v.output, '.')[1]) <= 6 then
'https://raw.githubusercontent.com/pyrra-dev/pyrra/v%s/config/crd/bases/pyrra.dev_servicelevelobjectives.yaml' % v.version
else
'https://raw.githubusercontent.com/pyrra-dev/pyrra/v%s/examples/kubernetes/manifests/setup/pyrra-slo-CustomResourceDefinition.yaml' % v.version,
output: v.output,
prefix: '^dev\\.pyrra\\..*',
crds: [url],
localName: 'pyrra',
}
for v in versions
]
)

0 comments on commit 25d8de3

Please sign in to comment.