Skip to content

Commit

Permalink
meta-kubernetes and meta-kubernetes-preprocessed v1.29.0 (#4)
Browse files Browse the repository at this point in the history
* Move simple logic to meta-kubernetes-preprocessed
* Use raw resources in meta-kubernetes
  • Loading branch information
vladarts authored May 22, 2024
1 parent 9421a4a commit 8f00673
Show file tree
Hide file tree
Showing 40 changed files with 27,375 additions and 3,883 deletions.
4 changes: 4 additions & 0 deletions charts/meta-kubernetes-preprocessed/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
config/*
values.schema.full.json
values.example.yaml
resources/*
6 changes: 6 additions & 0 deletions charts/meta-kubernetes-preprocessed/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: v2
name: meta-kubernetes-preprocessed
description: Metachart born Helm Chart for Kubernetes resources with preprocessors
type: application
version: "1.29.0"
appVersion: none
53 changes: 53 additions & 0 deletions charts/meta-kubernetes-preprocessed/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# meta-kubernetes-preprocessed

`meta-kubernetes-preprocessed` is a [metachart](https://github.com/iponweb/metachart)
born [Helm](https://helm.sh/) Chart for
[kubernetes](https://github.com/kubernetes/kubernetes) resources with some
preprocessors defined cardinally simplifying work with managed resources by:

- Defining related resources (like Services and Deployments)
- Structure of some objects (like Pods) changed to be more tolerant for overrides

## Quickstart

Add the [Helm](https://helm.sh/) repository:

```shell
helm repo add iponweb https://iponweb.github.io/charts/
```

Add the [values.schema.json](values.schema.json) file to your favourite IDE
to enable values file autocompletion and validation.
Examples:
- [IntelliJ IDEA](https://www.jetbrains.com/help/idea/json.html#ws_json_schema_add_custom)
- [Visual Studio Code](https://code.visualstudio.com/docs/languages/json#_json-schemas-and-settings)
- [Sublime Text](https://github.com/sublimelsp/LSP-json)

Define `values.yaml` with required resources and install the release:

```shell
helm install release-name -f values.yaml iponweb/meta-kubernetes-preprocessed
```

See also [values.example.yaml](values.example.yaml)

## Documentation

Read the [Documentation](docs) section. Some examples can be found in the
[examples](examples) directory.

For complete resources list support see [resources](docs/resources.md).

See the `metachart` [Documentation](https://github.com/iponweb/metachart/docs)
for more details.

## Requirements

Minimal supported [Helm](https://helm.sh/) version is `v3.2.0`.

## Versioning

Chart major and minor version parts follow
[kubernetes](https://github.com/kubernetes/kubernetes)
versions which has been used for the chart generation. Patch component is used
for charts own changes/fixes.
178 changes: 178 additions & 0 deletions charts/meta-kubernetes-preprocessed/config/resources.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
resources:
images:
template: false
jsonSchemaRef: metachart.api.internal.Image
defaults: false

#: rbac.authorization.k8s.io/v1
roles:
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
jsonSchemaRef: metachart.api.io.k8s.api.rbac.v1.Role
rolebindings:
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
jsonSchemaRef: metachart.api.io.k8s.api.rbac.v1.RoleBinding
clusterroles:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
jsonSchemaRef: metachart.api.io.k8s.api.rbac.v1.ClusterRole
clusterrolebindings:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
jsonSchemaRef: metachart.api.io.k8s.api.rbac.v1.ClusterRoleBinding

#: apiregistration.k8s.io/v1
apiservices:
apiVersion: apiregistration.k8s.io/v1
kind: APIService
jsonSchemaRef: metachart.api.io.k8s.kube-aggregator.pkg.apis.apiregistration.v1.APIService

#: admissionregistration.k8s.io/v1
mutatingwebhookconfigurations:
apiVersion: admissionregistration.k8s.io/v1
kind: MutatingWebhookConfiguration
jsonSchemaRef: metachart.api.io.k8s.api.admissionregistration.v1.MutatingWebhookConfiguration
validatingwebhookconfigurations:
apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
jsonSchemaRef: metachart.api.io.k8s.api.admissionregistration.v1.ValidatingWebhookConfiguration

#: apiextensions.k8s.io/v1
customresourcedefinitions:
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
jsonSchemaRef: metachart.api.io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinition

#: networking.k8s.io/v1
ingresses:
apiVersion: networking.k8s.io/v1
kind: Ingress
jsonSchemaRef: metachart.api.io.k8s.api.networking.v1.Ingress
ingressclasses:
apiVersion: networking.k8s.io/v1
kind: IngressClass
jsonSchemaRef: metachart.api.io.k8s.api.networking.v1.IngressClass
networkpolicies:
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
jsonSchemaRef: metachart.api.io.k8s.api.networking.v1.NetworkPolicy

#: storage.k8s.io/v1
storageclasses:
apiVersion: storage.k8s.io/v1
kind: StorageClass
jsonSchemaRef: metachart.api.io.k8s.api.storage.v1.StorageClass
csidrivers:
apiVersion: storage.k8s.io/v1
kind: CSIDriver
jsonSchemaRef: metachart.api.io.k8s.api.storage.v1.CSIDriver

#: v1
limitranges:
apiVersion: v1
kind: LimitRange
jsonSchemaRef: metachart.api.io.k8s.api.core.v1.LimitRange
namespaces:
apiVersion: v1
kind: Namespace
jsonSchemaRef: metachart.api.io.k8s.api.core.v1.Namespace
podtemplates:
apiVersion: v1
kind: PodTemplate
jsonSchemaRef: metachart.api.io.k8s.api.core.v1.PodTemplate
resourcequotas:
apiVersion: v1
kind: ResourceQuota
jsonSchemaRef: metachart.api.io.k8s.api.core.v1.ResourceQuota
serviceaccounts:
apiVersion: v1
kind: ServiceAccount
jsonSchemaRef: metachart.api.io.k8s.api.core.v1.ServiceAccount
persistentvolumes:
apiVersion: v1
kind: PersistentVolume
jsonSchemaRef: metachart.api.io.k8s.api.core.v1.PersistentVolume
persistentvolumeclaims:
apiVersion: v1
kind: PersistentVolumeClaim
jsonSchemaRef: metachart.api.io.k8s.api.core.v1.PersistentVolumeClaim
configmaps:
apiVersion: v1
kind: ConfigMap
jsonSchemaRef: metachart.api.io.k8s.api.core.v1.ConfigMap
secrets:
apiVersion: v1
kind: Secret
jsonSchemaRef: metachart.api.io.k8s.api.core.v1.Secret
services:
apiVersion: v1
kind: Service
jsonSchemaRef: metachart.api.io.k8s.api.core.v1.Service
containers:
jsonSchemaRef: metachart.api.core.v1.Container
template: false
root: false
defaults: true
pods:
apiVersion: v1
kind: Pod
jsonSchemaRef: metachart.api.core.v1.Pod

#: apps/v1
deployments:
apiVersion: apps/v1
kind: Deployment
jsonSchemaRef: metachart.api.io.k8s.api.apps.v1.Deployment
daemonsets:
apiVersion: apps/v1
kind: DaemonSet
jsonSchemaRef: metachart.api.io.k8s.api.apps.v1.DaemonSet
statefulsets:
apiVersion: apps/v1
kind: StatefulSet
jsonSchemaRef: metachart.api.io.k8s.api.apps.v1.StatefulSet

#: autoscaling/v2
horizontalpodautoscalers:
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
jsonSchemaRef: metachart.api.io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler

#: batch/v1
jobs:
apiVersion: batch/v1
kind: Job
jsonSchemaRef: metachart.api.io.k8s.api.batch.v1.Job
cronjobs:
apiVersion: batch/v1
kind: CronJob
jsonSchemaRef: metachart.api.io.k8s.api.batch.v1.CronJob

#: certificates.k8s.io/v1
certificatesigningrequests:
apiVersion: certificates.k8s.io/v1
kind: CertificateSigningRequest
jsonSchemaRef: metachart.api.io.k8s.api.certificates.v1.CertificateSigningRequest

#: policy/v1
poddisruptionbudgets:
apiVersion: policy/v1
kind: PodDisruptionBudget
jsonSchemaRef: metachart.api.io.k8s.api.policy.v1.PodDisruptionBudget

#: scheduling.k8s.io/v1
priorityclasses:
apiVersion: scheduling.k8s.io/v1
kind: PriorityClass
jsonSchemaRef: metachart.api.io.k8s.api.scheduling.v1.PriorityClass

#: flowcontrol.apiserver.k8s.io/v1beta3
flowschemas:
apiVersion: flowcontrol.apiserver.k8s.io/v1
kind: FlowSchema
jsonSchemaRef: metachart.api.io.k8s.api.flowcontrol.v1.FlowSchema
prioritylevelconfigurations:
apiVersion: flowcontrol.apiserver.k8s.io/v1
kind: PriorityLevelConfiguration
jsonSchemaRef: metachart.api.io.k8s.api.flowcontrol.v1.PriorityLevelConfiguration
Loading

0 comments on commit 8f00673

Please sign in to comment.