draughtsman

command module
v0.0.0-...-e0e0b42 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2022 License: Apache-2.0 Imports: 22 Imported by: 0

README

⚠️ This repository has been archived and is no longer supported ⚠️

draughtsman

CircleCI Docker Repository on Quay

draughtsman is a deployment agent for Kubernetes clusters.

It is designed to be used in several Kubernetes clusters to deploy and manage applications running with different configurations.

Kubernetes Configuration

draughtsman runs in its own namespace, named draughtsman.

For configuration of draughtsman itself, a Secret named draughtsman is required, inside the draughtsman namespace.

For example:

apiVersion: v1
kind: Secret
metadata:
  name: draughtsman
  namespace: draughtsman
  labels:
    app: draughtsman
type: Opaque
data:
  secret.yaml: <SECRET-CONFIGURATION-BASE64-ENCODED-HERE>

with the secret configuration (for example) as follows:

service:
    slack:
        token: ...
    deployer:
        environment: ...
        eventer:
            github:
                oauthtoken: ...
                organisation: ...
                projectlist: ...
        installer:
            helm:
                username: ...
                password: ...
                organisation: ...
        notifier:
            slack:
                channel: ...

This file needs to be updated, the file contents base64 encoded, and then inserted into the secret.

A second ConfigMap is also necessary, if using the ConfigMap Configurer (the default). By default, this configmap is named draughtsman-values, and is in the draughtsman namespace.

For example:

apiVersion: v1
kind: ConfigMap
metadata:
  name: draughtsman-values
  namespace: draughtsman
data:
  values: |
    Installation:
      V1:
        GiantSwarm:
          API:
            Address:
              Scheme: "https"
              Host: "api-test.giantswarm.io

All data under the values key (by default), is passed verbatim to Helm, to provide values for chart Installations.

Helm and RBAC

Draughtsman uses helm as packager manager to deploy and manage the applications in the cluster. In latest kubernetes versions, RBAC (Role-Based Access Control) is enable by default. In that case helm will need a cluster role and service account to work properly.

apiVersion: v1
kind: ServiceAccount
metadata:
  name: tiller
  namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
  name: tiller
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: cluster-admin
subjects:
  - kind: ServiceAccount
    name: tiller
    namespace: kube-system

Furtherly, helm should be installed using the flag service account set to tiller.

helm init --service-account tiller

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg
Package server provides a server implementation to connect network transport protocols and service business logic by defining server endpoints.
Package server provides a server implementation to connect network transport protocols and service business logic by defining server endpoints.
Package service implements business logic to create Kubernetes resources against the Kubernetes API.
Package service implements business logic to create Kubernetes resources against the Kubernetes API.

Jump to

Keyboard shortcuts

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