Skip to content
This repository has been archived by the owner on Nov 20, 2021. It is now read-only.

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRx committed Sep 10, 2020
0 parents commit 5e08dfd
Show file tree
Hide file tree
Showing 382 changed files with 22,828 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
kind: pipeline
type: docker
name: default

steps:
- name: fetch
image: alpine/git
commands:
- git fetch --tags

- name: testing
image: golang:1.14
commands:
- make test

- name: lint
image: golang:1.14
commands:
- make lint

- name: release
image: golang:1.14
volumes:
- name: gocache
path: /go
when:
branch:
- master
event:
- tag
environment:
GITHUB_TOKEN:
from_secret: github_token
PACKAGECLOUD_TOKEN:
from_secret: packagecloud_token
commands:
- curl -sL https://git.io/goreleaser | bash
- curl -F "package[distro_version_id]=190" -F "package[package_file]=@$(ls dist/crit_*_x86_64.deb)" https://$PACKAGECLOUD_TOKEN:@packagecloud.io/api/v1/repos/criticalstack/public/packages.json
- curl -F "package[distro_version_id]=204" -F "package[package_file]=@$(ls dist/crit_*_x86_64.rpm)" https://$PACKAGECLOUD_TOKEN:@packagecloud.io/api/v1/repos/criticalstack/public/packages.json

volumes:
- name: gocache
temp: {}
41 changes: 41 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
bin/
cmd/bootstrap-server/bootstrap-server


# kubeconfig files
admin.conf
.kube/

# ignore Go testing fixtures
testdata

*.crt
*.key

# vagrant files
*.box
.vagrant/

# terraform state files
terraform.tfstate*
terraform.tfplan
.terraform*
terraform.tfvars
terraform.tfvars.json

packer_cache/

# tools
hack/*/.cache/
tools/containerd-sync/containerd-sync
tools/genconf/genconf

dist/
vendor/

# book
docs/book

*.tgz
*.tar
*.tar.gz
10 changes: 10 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
linters:
# Run with --fast=false for more extensive checks
fast: true
issues:
max-same-issues: 0
max-issues-per-linter: 0
run:
deadline: 2m
timeout: 5m
tests: false
109 changes: 109 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
before:
hooks:
# Ensure that any go.mod modifications due to linters, go generate, etc are
# removed.
- go mod tidy
# Using Go modules intrinsically causes modifications to these files that are
# unfortunately unavoidable. Newer patch versions available to the CI will
# satisfy the same module requirements and cause additions to go.sum.
- git checkout -- go.sum
- git checkout -- hack/tools/go.sum
builds:
- id: crit
env:
- CGO_ENABLED=0
- GO111MODULE=on
main: ./cmd/crit
binary: crit
goarch:
- "386"
- amd64
- arm64
gcflags:
- all=-trimpath={{.Env.GOPATH}}
asmflags:
- all=-trimpath={{.Env.GOPATH}}
ldflags:
- -s -w
- -X "github.com/criticalstack/crit/pkg/buildinfo.Date={{.Date}}"
- -X "github.com/criticalstack/crit/pkg/buildinfo.GitSHA={{.ShortCommit}}"
- -X "github.com/criticalstack/crit/pkg/buildinfo.Version={{.Tag}}"
- id: cinder
env:
- CGO_ENABLED=0
- GO111MODULE=on
main: ./cmd/cinder
binary: cinder
gcflags:
- all=-trimpath={{.Env.GOPATH}}
asmflags:
- all=-trimpath={{.Env.GOPATH}}
ldflags:
- -s -w
- -X "github.com/criticalstack/crit/pkg/buildinfo.Date={{.Date}}"
- -X "github.com/criticalstack/crit/pkg/buildinfo.GitSHA={{.ShortCommit}}"
- -X "github.com/criticalstack/crit/pkg/buildinfo.Version={{.Tag}}"
archives:
- replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
nfpms:
- file_name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
package_name: criticalstack
homepage: https://github.com/criticalstack/crit
description: A tool for bootstrapping Kubernetes
maintainer: criticalstack <[email protected]>
license: Apache-2.0
vendor: criticalstack
bindir: "/usr/local/bin"
replacements:
amd64: x86_64
formats:
- deb
- rpm
conflicts:
- kubeadm
empty_folders:
- /etc/kubernetes
- /etc/kubernetes/pki
- /etc/kubernetes/pki/etcd
- /etc/containerd
- /etc/cni
- /etc/cni/net.d
- /etc/systemd/system/kubelet.service.d
files:
build/package/modules.conf: /etc/modules-load.d/crit-modules.conf
build/package/sysctl.conf: /etc/sysctl.d/crit-sysctl.conf
build/package/20-crit.conf: /etc/systemd/system/kubelet.service.d/20-crit.conf
build/package/disable-swap.service: /etc/systemd/system/disable-swap.service
build/package/containerd-config.toml: /etc/containerd/config.toml
config_files:
scripts:
postinstall: "build/package/postinstall.sh"
postremove: "build/package/postremove.sh"
overrides:
deb:
dependencies:
- cri-tools (>= 1.13.0)
- kubelet (>= 1.14.0)
recommends:
- containerd (>= 1.2.6)
rpm:
dependencies:
- cri-tools >= 1.13.0
- kubelet >= 1.14.0
recommends:
- containerd >= 1.2.6
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
Loading

0 comments on commit 5e08dfd

Please sign in to comment.