Skip to content

parca-dev/demo-deployments

Repository files navigation

Parca Demo Deployments

This is our demo.parca.dev cluster configuration.

  • argocd - App Status
  • argocd-applications - App Status
  • cert-manager - App Status
  • cluster-config - App Status
  • flux - App Status
  • grafana - App Status
  • ingress-nginx - App Status
  • monitoring - App Status
  • oauth2-proxy - App Status
  • parca - App Status
  • parca-devel - App Status

Ask in one of our channels to be invited to the Scaleway Organization. Once you have access you can download the kubeconfig via the UI.

File structure

.
├── README.md
└── <application>/  # Kubernetes resources configuration of an appliciation

Deployment types

All the manifest outputs can be passed to kubectl, example:

${COMMAND} | kubectl diff --namespace "${NAMESPACE}" --filename -

Our strongly opinionated order of preference:

  • preferred upstream method (must be 1st class, not derived from another. If more than 1, follow our order of preference)
  • Kustomize
  • Jsonnet
  • Helm

Environment names are generally <cluster_name> or <cluster_name>-<instance>.

Kustomize

${APPLICATION}/
├── base/                          # Common resources
│   ├── kustomization.yaml
│   ├── resource1.yaml
│   ...
│   └── resourceN.yaml
├── components/
│   └── ${FEATURE}/                # Optional feature resources and overrides
│       ├── kustomization.yaml
│       ├── resource1.yaml
│       ...
│       └── resourceN.yaml
└── overlays/
    └── ${ENVIRONMENT}/            # Environment-specific resources and overrides
        ├── kustomization.yaml
        ├── extra-resource1.yaml
        ...
        └── extra-resourceN.yaml

Build manifest locally:

cd "${APPLICATION}/overlays/${ENVIRONMENT}"
kustomize build

Requires Kustomize.

Jsonnet

${APPLICATION}/
├── environements/
│  └── ${ENVIRONMENT}/       # Environment-specific resources and overrides
│      ├── main.jsonnet      # Jsonnet "entrypoint" file
│      └── spec.json         # Tanka environment configuration
├── lib/                     # Jsonnet libraries
├── vendor/                  # Third-party libraries
├── jsonnetfile.json         # Jsonnet-bundler dependency tracking
└── jsonnetfile.lock.json    # Jsonnet-bundler dependency lock file

Build manifest locally:

cd "${APPLICATION}"
jb install    # optional, 3rd-party libraries are checked in Git
jsonnet -J vendor -J lib "environments/${ENVIRONMENT}/main.jsonnet"

Requires Jsonnet and jsonnet-bundler.

Or with Tanka:

tk show "environments/${ENVIRONMENT}"

Requires Tanka.

Helm

${APPLICATION}/
├── Chart.lock
├── Chart.yaml
├── values.yaml               # Common values
└── values/
    └── ${ENVIRONMENT}.yaml   # Environment-specific values and overrides

Build manifest locally:

cd "${APPLICATION}/"
helm dependency build
helm template "${RELEASE_NAME}" --namespace "${NAMESPACE}" . \
  --values values/${ENVIRONMENT}.yaml

Requires Helm.

Manifests validation

Manifests validation is performed by kubeconform. JSON schemas are extracted from custom resource definitions under .schemas/. Edit .schemas/Makefile to update them and use make -C .schemas to re-generate them.

Validation can be performed by passing the manifest output to kubeconform:

${COMMAND} | kubeconform \
  -schema-location '.schemas/{{ .ResourceKind }}{{ .KindSuffix }}.json' \
  -schema-location 'https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master' \
  -skip CustomResourceDefinition \
  -strict

Continuous deployment

About

Kubernetes Configuration for the Demo Environment

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published