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

Dynamic resources files JSON schema file structure #303

Merged
merged 2 commits into from
Jan 30, 2025

Conversation

Adam0Brien
Copy link
Contributor

PR Template:

Describe your changes

Proposed design for storing and validating JSON schemas/payloads

  • The validation will take the respective schemas and validate resources/reporters based on the file names/directories in this setup
  • In this example k8s_cluster.json defines the required fields of a resource_type
  • Reporterdata will then be validated seperatly after the resource data
 └── resources
│       ├── k8s_cluster
│       │   ├── config.yaml # Defines what reporters can be associated with a resource
│       │   ├── k8s_cluster.json # resource type schema
│       │   └── reporters
│       │       ├── acm
│       │       │   ├── acm.json # reporter type JSON schema
│       │       │   ├── config.yaml # define relation properties/namespace
│       │       │  
│       │       └── ocm
│       │           ├── config.yaml # define relation properties/namespace
│       │           └── ocm.json # reporter type JSON schema

Ticket reference (if applicable)

Fixes #https://issues.redhat.com/browse/RHCLOUD-37415

Checklist

  • Are the agreed upon acceptance criteria fulfilled?

  • Was the 4-eye-principle applied? (async PR review, pairing, ensembling)

  • Do your changes have passing automated tests and sufficient observability?

  • Are the work steps you introduced repeatable by others, either through automation or documentation?

    • If automation is possible but not done due to other constraints, a ticket to the tech debt sprint is added
    • An SOP (Standard Operating Procedure) was created
  • The Changes were automatically built, tested, and - if needed, behind a feature flag - deployed to our production environment. (Please check this when the new deployment is done and you could verify it.)

  • Are the agreed upon coding/architectural practices applied?

  • Are security needs fullfilled? (e.g. no internal URL)

  • Is the corresponding Ticket in the right state? (should be on "review" now, put to done when this change made it to production)

  • For changes to the public API / code dependencies: Was the whole team (or a sufficient amount of ppl) able to review?

@Adam0Brien Adam0Brien changed the title WIP: RHDynamic resources files structure WIP: Dynamic resources files JSON schema structure Jan 21, 2025
@Adam0Brien Adam0Brien changed the title WIP: Dynamic resources files JSON schema structure WIP: Dynamic resources files JSON schema file structure Jan 21, 2025
@Adam0Brien Adam0Brien force-pushed the dynamic-resources-files branch from 766564a to 4715cb7 Compare January 21, 2025 15:09
@@ -0,0 +1,5 @@
resource_type: k8s_cluster
resource_reporters:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can add major/minor version on the config?
@jmelis

Copy link
Contributor

@akoserwal akoserwal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Left comment to discuss adding versioning

@app-sre-bot
Copy link
Collaborator

Can one of the admins verify this patch?

@Adam0Brien Adam0Brien force-pushed the dynamic-resources-files branch 3 times, most recently from 9ec2349 to 54bb6be Compare January 27, 2025 08:52
@Adam0Brien Adam0Brien marked this pull request as ready for review January 27, 2025 09:02
@Adam0Brien Adam0Brien changed the title WIP: Dynamic resources files JSON schema file structure Dynamic resources files JSON schema file structure Jan 27, 2025
@Adam0Brien Adam0Brien force-pushed the dynamic-resources-files branch 2 times, most recently from d837881 to 2a037c4 Compare January 27, 2025 13:14
@Adam0Brien Adam0Brien force-pushed the dynamic-resources-files branch from 0a6cdb6 to dee5cdd Compare January 30, 2025 08:52
@snehagunta snehagunta merged commit a92ec93 into project-kessel:main Jan 30, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants