{"id":13798320,"url":"https://github.com/DevOpsHiveHQ/kustomize-plugin-kubeconform","last_synced_at":"2025-05-13T05:31:59.755Z","repository":{"id":153086515,"uuid":"624932700","full_name":"DevOpsHiveHQ/kustomize-plugin-kubeconform","owner":"DevOpsHiveHQ","description":"A plugin built around Kubeconform to validate manifests schema within Kusomize.","archived":false,"fork":false,"pushed_at":"2023-09-09T22:32:11.000Z","size":69,"stargazers_count":8,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-08T03:02:20.423Z","etag":null,"topics":["kubernetes","kustomize","kustomize-plugin","kustomize-validator","validation"],"latest_commit_sha":null,"homepage":"","language":"Go","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/DevOpsHiveHQ.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-04-07T16:12:08.000Z","updated_at":"2024-09-19T22:04:58.000Z","dependencies_parsed_at":"2023-11-11T13:31:47.483Z","dependency_job_id":"603e1d2f-552f-40b1-93df-6cd1150de689","html_url":"https://github.com/DevOpsHiveHQ/kustomize-plugin-kubeconform","commit_stats":null,"previous_names":["devopshivecloud/kustomize-plugin-kubeconform","devopshivehq/kustomize-plugin-kubeconform"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevOpsHiveHQ%2Fkustomize-plugin-kubeconform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevOpsHiveHQ%2Fkustomize-plugin-kubeconform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevOpsHiveHQ%2Fkustomize-plugin-kubeconform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevOpsHiveHQ%2Fkustomize-plugin-kubeconform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DevOpsHiveHQ","download_url":"https://codeload.github.com/DevOpsHiveHQ/kustomize-plugin-kubeconform/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253883121,"owners_count":21978611,"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","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":["kubernetes","kustomize","kustomize-plugin","kustomize-validator","validation"],"created_at":"2024-08-04T00:00:41.806Z","updated_at":"2025-05-13T05:31:56.125Z","avatar_url":"https://github.com/DevOpsHiveHQ.png","language":"Go","funding_links":[],"categories":["Plugins"],"sub_categories":["Validators"],"readme":"# KubeconformValidator\n\nA wrapper for [Kubeconform](https://github.com/yannh/kubeconform)\nto work as a Kustomize validator plugin via KRM functions.\n\nNote: This is still a playground.\n\n## Build\n\n```sh\ngo build -o 'dist/kubeconformvalidator' .\n```\n\n## Example\n```yaml\napiVersion: validators.kustomize.aabouzaid.com/v1alpha1\nkind: KubeconformValidator\nmetadata:\n  name: validate\n  annotations:\n    config.kubernetes.io/function: |\n      # Exec KRM functions.\n      exec:\n       path: ../dist/kubeconformvalidator\n\n      # # Containerized KRM functions.\n      # container:\n      #   image: aabouzaid/kubeconformvalidator\n      #   network: true\nspec:\n  # Configure Kubeconform.\n  config:\n    output: json\n    skip:\n    - AlertmanagerConfig\n  # Also, direct Kubeconform args could be used but \"spec.args\" has lower priority over \"spec.config\".\n  # https://github.com/yannh/kubeconform#Usage\n  # args:\n  # - -output\n  # - json\n  # - -skip\n  # - AlertmanagerConfig\n```\n\n## Try\n```sh\n# Make sure to build bin first.\nkustomize build --enable-alpha-plugins --enable-exec ./example\n```\n\nThe Kustomize output if the validation failed (there are schema errors):\n```\nKubeconform validation output: {\n  \"resources\": [\n    {\n      \"filename\": \"stdin\",\n      \"kind\": \"Service\",\n      \"name\": \"validated-core-resource\",\n      \"version\": \"v1\",\n      \"status\": \"statusInvalid\",\n      \"msg\": \"problem validating schema. Check JSON formatting: jsonschema: '/spec/ports/0/port' does not validate with https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/master-standalone/service-v1.json#/properties/spec/properties/ports/items/properties/port/type: expected integer, but got string\",\n      \"validationErrors\": [\n        {\n          \"path\": \"/spec/ports/0/port\",\n          \"msg\": \"expected integer, but got string\"\n        }\n      ]\n    }\n  ]\n}\nError: couldn't execute function: exit status 1\n```\n\nThe Kustomize output if the validation succeeded (there are no schema errors):\n```\napiVersion: v1\nkind: Service\nmetadata:\n  name: validated-core-resource\nspec:\n  ports:\n  - port: 8080\n    protocol: TCP\n    targetPort: 8080\n  type: ClusterIP\n---\napiVersion: monitoring.coreos.com/v1alpha1\nkind: AlertmanagerConfig\nmetadata:\n  name: skipped-custom-resource\nspec:\n  receivers:\n  - name: webhook\n    webhookConfigs:\n    - url: http://example.com/\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDevOpsHiveHQ%2Fkustomize-plugin-kubeconform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FDevOpsHiveHQ%2Fkustomize-plugin-kubeconform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDevOpsHiveHQ%2Fkustomize-plugin-kubeconform/lists"}