podpreset-crd

module
v0.0.0-...-b3e10d0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 27, 2018 License: Apache-2.0

README

PodPresets CRD

The source in the repository contains a PodPreset resource that's implemented via a CRD that is paired with a mutating webhook in order to modify pod specs on the fly.

Getting started

In order to deploy the PodPreset resource into your cluster, do the following:

  1. Deploy Kubernetes.

  2. Install kustomize.

  3. Run CRD, choose to execute inside or outside the cluster.

    Inside cluster:

    make docker-build
    make deploy
    

    Outside cluster (for debugging/development):

    make install
    make run
    
  4. Build the webhook container image.

    make docker-build-webhook
    
  5. Install the webhook.

    make deploy-webhook
    
  6. Apply desired pod presets as needed, example given below.

Example usage

kubectl create -f config/samples/apod-preset.yaml
kubectl create -f config/samples/apod.yaml

History

PodPresets has had a long history in various forms throughout its alpha life (it's still alpha). As of August 2018, the PodPreset resource still exists in the Kubernetes core, but is planned to be superceded by the code here.

Additional information

Certificates

The Makefile utilizes pre-generated certificates for use with the mutating webhook. An example script that generates new certificates is located in webhook/pki/gen-certs.sh. The cabundle patch file needs to be adjusted accordingly afterwards, unless the deployment file is used directly.

Service Catalog integration

This repository is only one piece required for full integration with Service Catalog. Also review the podpresetbinding-crd repository for functionality that auto-generates pod presets upon service bindings being ready.

WARNING

Until the podpresetbinding-crd work is complete, this repo will likely undergo force pushes to add additional necessary changes.

Directories

Path Synopsis
cmd
pkg
apis
Package apis contains Kubernetes API groups.
Package apis contains Kubernetes API groups.
apis/settings
Package settings contains settings API versions
Package settings contains settings API versions
apis/settings/v1alpha1
Package v1alpha1 contains API Schema definitions for the settings v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/jpeeler/podpreset-crd/pkg/apis/settings +k8s:defaulter-gen=TypeMeta +groupName=settings.svcat.k8s.io Package v1alpha1 contains API Schema definitions for the settings v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/jpeeler/podpreset-crd/pkg/apis/settings +k8s:defaulter-gen=TypeMeta +groupName=settings.svcat.k8s.io
Package v1alpha1 contains API Schema definitions for the settings v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/jpeeler/podpreset-crd/pkg/apis/settings +k8s:defaulter-gen=TypeMeta +groupName=settings.svcat.k8s.io Package v1alpha1 contains API Schema definitions for the settings v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/jpeeler/podpreset-crd/pkg/apis/settings +k8s:defaulter-gen=TypeMeta +groupName=settings.svcat.k8s.io

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL