GithubHelp home page GithubHelp logo

scothis / cartographer-conventions Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vmware-tanzu/cartographer-conventions

0.0 2.0 0.0 2.46 MB

Conventions provide a mechanism for platform operators to define cross cutting behavior that is applied to Kubernetes resources by understanding the developers intent and the semantics of the resources being advised.

License: Apache License 2.0

Makefile 1.02% Go 98.92% Dockerfile 0.06%

cartographer-conventions's Introduction

Cartographer Conventions

Conventions allow an operator to define cross cutting behavior that are directly relevant to the developer's intent. Conventions reduce the amount of manual configuration required to run applications on Kubernetes effectively.

Pre-requisites

This project requires access to a container registry for fetching image metadata. It will not work for images that have bypassed a registry by loading directly into a local daemon.

Install

From Source

We use Golang 1.18+ and ko to build the controller, and recommend kapp to deploy.

  1. Install cert-manager

    kapp deploy -n kube-system -a cert-manager -f dist/third-party/cert-manager.yaml
  2. Create a namespace to deploy components, if it doesn't already exist

    kubectl create ns cartographer-system
  3. Optional: Trust additional certificate authorities certificate

    If a PodIntent references an image in a registry whose certificate was not signed by a Public Certificate Authority (CA), a certificate error x509: certificate signed by unknown authority will occur while applying conventions. To trust additional certificate authorities include the PEM encoded CA certificates in a file and set following environment variable to the location of that file.

    CA_DATA=path/to/certfile # a PEM-encoded CA certificate
  4. Build and install Cartographer Conventions

    kapp deploy -n cartographer-system -a conventions \
      -f <( \
        ko resolve -f <( \
          ytt \
            -f dist/cartogrpaher-conventions.yaml \
            -f dist/ca-overlay.yaml \
            --data-value-file ca_cert_data=${CA_DATA:-dist/ca.pem} \
          ) \
      )

    Note: you'll need to export KO_DOCKER_REPO=<ACCESSIBLE_DOCKER_REPO> such that ko can push to the repository and your cluster can pull from it. Visit the ko README for more information.

Samples

  • Convention Server

    Apply custom conventions to workloads with a ClusterPodConvention pointing at a webhook convention server.

  • Spring Boot Conventions

    Apply custom conventions for Spring Boot workloads. This convention can detect if the workload is built from Spring Boot adding a label to the workload indicating the framework is spring-boot, and an annotation indicating the version of Spring Boot used.

  • Dumper Server

    Log the content of the webhook request to stdout. Useful for capturing the image metadata available to conventions.

Contributing

The Cartographer project team welcomes contributions from the community. If you wish to contribute code and you have not signed our contributor license agreement (CLA), our bot will update the issue when you open a Pull Request. For any questions about the CLA process, please refer to our FAQ. For more detailed information, refer to CONTRIBUTING.md.

License

Refer to LICENSE for details.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.