This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// DNS (!) permitted name parts | |
// It's permitted to use hyphens but these must occur at most once (!) between alphanumeric | |
name = { ASCII_ALPHANUMERIC ~ ( ( ASCII_ALPHANUMERIC ~ HYPHEN ~ ASCII_ALPHANUMERIC ) | ASCII_ALPHANUMERIC )* } | |
full_name = { "name=\"" ~ name ~ "\"" } | |
domain = { ASCII_ALPHA_LOWER+ } | |
full_domain = { "domain=\"" ~ domain ~ "\"" } | |
// It may be redundant to define these as constants!? | |
tcp = { "tcp" } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
sudo snap install microk8s --classic --channel=1.18/stable | |
sudo usermod -a -G microk8s dazwilkin | |
sudo microk8s status --wait-ready | |
sudo microk8s enable dns helm3 rbac |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; | |
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; | |
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; | |
/*!40101 SET NAMES utf8mb4 */; | |
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; | |
/*!40103 SET TIME_ZONE='+00:00' */; | |
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; | |
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; | |
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; | |
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM golang:1.13 as build | |
WORKDIR /server | |
COPY go.mod ./ | |
COPY main.go ./ | |
RUN CGO_ENABLED=0 GOOG=linux go build -o /go/bin/server main.go | |
FROM scratch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: gcr.io/cloud-builders/docker | |
args: | |
- build | |
- --file=./deployment/Dockerfile.server | |
- --tag=gcr.io/${PROJECT_ID}/server:${COMMIT_SHA} | |
- . |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: golang:1.12 | |
env: | |
- CGO_ENABLED=0 | |
- GOOS=linux | |
args: | |
- go | |
- build | |
- -a | |
- -installsuffix | |
- cgo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: busybox | |
args: | |
- sh | |
- -c | |
- 'mv /go/src/path/to/repo/protos/*.go ./protos' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: gcr.io/${PROJECT_ID}/protoc | |
args: | |
- --proto_path=./protos | |
- --plugin=protoc-gen-go=/go/bin/protoc-gen-go | |
- --go_out=plugins=grpc:/go/src | |
- ./protos/some.proto |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: golang:1.12 | |
args: | |
- go | |
- get | |
- -u | |
- github.com/golang/protobuf/protoc-gen-go |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
options: | |
env: | |
- GO111MODULE=on | |
- GOPROXY=https://proxy.golang.org | |
volumes: | |
- name: go-modules | |
path: /go |