helmx

package module
v1.17.1 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2022 License: MIT Imports: 6 Imported by: 1

README

HelmX

GoDoc Widget Build Status codecov Go Report Card

Deploy k8s on flying.

# Example

project:
  name: helmx
  feature: test
  group: helmx
  version: 0.0.0
  description: helmx

service:
  hostNetwork: true
  imagePullSecret: qcloud-registry://username:[email protected]/pf-
  hostAliases:
    - "127.0.0.1:test1.com,test2.com"
    - "127.0.0.2:test2.com,test3.com"
  mounts:
    - "data:/usr/share/nginx:ro"
  ports:
    - "80:80"
    - "!20000:80"
  livenessProbe:
    action: "http://:80"
  lifecycle:
    preStop: "nginx -s quit"
  ingresses:
    - "http://helmx:80/helmx"
  serviceAccountName: test
  serviceAccountRoleRules:
    - secrets#get,update
  securityContext:
    runAsUser: 1024
    runAsGroup: 1000
    runAsNonRoot: true
    readOnlyRootFilesystem: true
    privileged: true
  topologySpreadConstraints:
    - maxSkew: 1
      topologyKey: zone
      whenUnsatisfiable: DoNotSchedule
      labelSelector:
        matchLabels:
          foo: bar
  affinity:
    nodeAffinity:
      requiredDuringSchedulingIgnoredDuringExecution:
        nodeSelectorTerms:
          - matchExpressions:
              - key: zone
                operator: NotIn
                values:
                  - zoneC
  initials:
    - image: dockercloud/hello-world
      mounts:
        - "data:/usr/share/nginx"
      command:
        - mv
      args:
        - /www
        - /usr/share/nginx/html

jobs:
  doonce:
    image: busybox
    backoffLimit: 4
  dosomecron:
    image: busybox
    cron:
      schedule: "*/1 * * * *"

envs:
  env: "test"
  valueWithDot: "value.with.dot"
  secretFalse: "####secretName.secretKey.false####"
  secretTrue: "####secretName.secretKey.true####"
  configMap: "####configMapName.configMapKey####"
  
resources:
  cpu: 10/20m
  memory: 0/20Mi
  nvidia.com/gpu: 0/20

tolerations:
  - env=test
  - project

volumes:
  data:
    emptyDir:
      medium: Memory
      sizeLimit: "1Gi"

upstreams:
  - redis
  - mysql

labels:
  testKey1: testValue1
  testKey2: testValue2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustBytes

func MustBytes(data []byte, err error) []byte

func MustReadOrFetch

func MustReadOrFetch(fileOrURL string) []byte

func ReadOrFetch

func ReadOrFetch(fileOrURL string) ([]byte, error)

Types

type HelmX

type HelmX struct {
	spec.Spec
	*tmpl.TemplateMgr
}

func NewHelmX

func NewHelmX() *HelmX

func (*HelmX) FromYAML

func (hx *HelmX) FromYAML(data []byte) error

func (*HelmX) ToYAML

func (hx *HelmX) ToYAML() ([]byte, error)

Directories

Path Synopsis
encoding

Jump to

Keyboard shortcuts

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