{"id":20858833,"url":"https://github.com/controlplaneio/kubernetes-json-schema-container","last_synced_at":"2025-07-22T11:33:42.896Z","repository":{"id":99275951,"uuid":"226317121","full_name":"controlplaneio/kubernetes-json-schema-container","owner":"controlplaneio","description":"Containerisation for kubernetes-json-schema","archived":false,"fork":false,"pushed_at":"2020-01-09T10:43:39.000Z","size":100,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-12T14:14:27.426Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/controlplaneio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-12-06T11:40:37.000Z","updated_at":"2020-01-09T10:43:41.000Z","dependencies_parsed_at":"2023-04-06T00:27:09.941Z","dependency_job_id":null,"html_url":"https://github.com/controlplaneio/kubernetes-json-schema-container","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/controlplaneio/kubernetes-json-schema-container","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/controlplaneio%2Fkubernetes-json-schema-container","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/controlplaneio%2Fkubernetes-json-schema-container/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/controlplaneio%2Fkubernetes-json-schema-container/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/controlplaneio%2Fkubernetes-json-schema-container/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/controlplaneio","download_url":"https://codeload.github.com/controlplaneio/kubernetes-json-schema-container/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/controlplaneio%2Fkubernetes-json-schema-container/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266483788,"owners_count":23936422,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-18T04:47:42.061Z","updated_at":"2025-07-22T11:33:42.852Z","avatar_url":"https://github.com/controlplaneio.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kubernetes JSON Schemas Container\n\n## About\n\nPutting [Kubernetes JSON Schemas][kubernetes_schemas_repo] into containers for easy use when building containers.\n\n[kubernetes_schemas_repo]: https://github.com/instrumenta/kubernetes-json-schema.git\n\n## Usage\n\nTo use the schemas in your containers you can add the following:\n\n```Dockerfile\nCOPY --from=controlplane/kubernetes-json-schema:master-standalone / /some/location\n```\n\nJust change the tag from `master-standalone` to whichever schema you want, preferably something version pinned to avoid breaking changes.\n\n## Tracking the build of these images\n\nIn an attempt to help track how images have been built there are various Annotations/Labels to provide relevant information.\n\nThis isn't intended to be a comprehensive solution but it's a start.\n\nThe `ci_link` label is not very precise, as GitHub Actions doesn't make run IDs very clear, and will only link to the overall workflow.\nAdditional details such as the `revision` and `created` tags should help you narrow down your search for which run built and pushed that specific image tag.\n\nNote: *I have looked around for methods of getting a more precise link for a specific action's output but haven't had much luck.\nThere have been some support posts but nothing has worked so far.\nIf you can demonstrate a method of producing a link to an action's own output from within said action please file an issue with details.*\n\n## Manually building containers\n\nYou can simply run `build.sh` if you have `git`, `jq`, `curl`, and probably also GNU user-land utilities (e.g. GNU's version of `date` rather than the BSD version).\n\nYou can run `build.sh true` to try building all version tags but it will still skip existing tags.\n\nTo not skip existing tags you can run `SKIP_EXISTING=false build.sh`.\n\nYou can add `true` like above to build all and not skip existing tags.\n\nHere is an example of how to manually build images using the bare-bones `Dockerfile`:\n\n```sh\ndocker build ./kubernetes-json-schema/v1.16.0-standalone -f Dockerfile -t controlplane/kubernetes-json-schema:v1.16.0-standalone --build-arg DATETIME=\"$(date --rfc-3339=seconds | sed 's/ /T/')\"\n# The DATETIME arg is used for the OCI Annotation `org.opencontainers.image.created` which should be an RFC-3339 date-time\n# the GNU Date tool doesn't include date-time specifically so sed is used here to insert the T\n# If you don't care about the tag feel free to replace it with \"N/A\"\n```\n\nIf you manually run `docker build` you will also need to manually clone the schema repo and make sure it's up to date.\nAlso you wont need the additional dependencies like `jq` or `curl`.\n\nThere are additional build args you can modify depending on your requirements or just simply adapt the `Dockerfile` for your needs.\n\n## Thoughts for potential future changes\n\n* Automatically create new `Dockerfile`s\n  * There is potential to move to CI that will automatically create and commit new `Dockerfile`s from a template based on new versions.\n  * The benefit of this is it can make it easier to inspect the container.\n  * The negative is it's quite a lot of faff.\n  * Also it still wont lead to Docker Hub Automated builds because new tags for DH Automated builds must be added manually\n* Ensure tags wont change underneath people\n  * We need to do more investigation into if the schemas can be changed retroactively.\n  * In theory with semantic versioning they shouldn't or at least won't have breaking changes but that is yet to be confirmed.\n* Confirm dependencies\n  * The `build.sh` script requires `git`, `jq`, `curl`, and probably GNU user-land tooling\n  * `git` will remain a requirement and `jq` is by far the easiest way to work with JSON from the Docker Hub API\n  * We can confirm GNU tooling is required and potentially try move to a POSIX compliant version of `date` or other utilities\n  * We can potentially check for `curl` or `wget` and change the script to use either but it's not much of a requirement to ask people to use `curl`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcontrolplaneio%2Fkubernetes-json-schema-container","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcontrolplaneio%2Fkubernetes-json-schema-container","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcontrolplaneio%2Fkubernetes-json-schema-container/lists"}