View docker-compose.yaml
This file contains 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
--- | |
version: "3.9" | |
services: | |
zookeeper: | |
image: confluentinc/cp-zookeeper:6.2.0 | |
hostname: zookeeper | |
container_name: zookeeper | |
ports: | |
- "2181:2181" | |
environment: |
View main.go
This file contains 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
... | |
privateKeyBytes, err := ioutil.ReadFile("/path/to/my/private.key") | |
if err != nil { | |
log.Fatalf("failed to read private key file: %v", err) | |
} | |
block, _ := pem.Decode(privateKeyBytes) | |
if err != nil { | |
log.Fatalf("failed to decode private key to PEM: %v", err) | |
} |
View docker-compose.yaml
This file contains 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
version: "3.9" | |
services: | |
haproxy: | |
image: haproxy:lts | |
container_name: haproxy | |
user: 1000:1000 | |
ports: | |
- 80:8080 | |
- 443:8443 |
View Makefile
This file contains 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
build-with-docker: | |
docker run -it --rm \ | |
-v $(shell pwd):/go/src/github.com/vniche/armv6-sample-app \ | |
-w /go/src/github.com/vniche/armv6-sample-app \ | |
--platform linux/arm/v6 \ | |
golang:1.15-buster go build -o sample-app . |
View monitored-minikube.sh
This file contains 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
# start minikube k8s | |
minikube delete | |
minikube start --kubernetes-version=v1.18.1 --memory=6g \ | |
--bootstrapper=kubeadm --extra-config=kubelet.authentication-token-webhook=true \ | |
--extra-config=kubelet.authorization-mode=Webhook --extra-config=scheduler.address=0.0.0.0 \ | |
--extra-config=controller-manager.address=0.0.0.0 --driver=docker | |
# disable k8s metrics-server as it is going to be served by prometheus | |
minikube addons disable metrics-server |
View jaeger-operator.yaml
This file contains 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
--- | |
apiVersion: v1 | |
kind: Namespace | |
metadata: | |
name: observability | |
--- | |
apiVersion: apiextensions.k8s.io/v1beta1 | |
kind: CustomResourceDefinition | |
metadata: |
View kube-prometheus-setup.yaml
This file has been truncated, but you can view the full file.
This file contains 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
--- | |
apiVersion: v1 | |
kind: Namespace | |
metadata: | |
name: monitoring | |
--- | |
apiVersion: apiextensions.k8s.io/v1 | |
kind: CustomResourceDefinition | |
metadata: |
View jaeger-all-in-one-template.yml
This file contains 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
# | |
# Copyright 2017-2019 The Jaeger Authors | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except | |
# in compliance with the License. You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software distributed under the License | |
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express |
View resolver.go
This file contains 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
... | |
func (r *mutationResolver) Signup(ctx context.Context, input NewUser) (string, error) { | |
user := &User{ | |
ID: uuid.New().String(), | |
Name: input.Name, | |
Surename: input.Surename, | |
CreatedAt: time.Now().String(), | |
} | |
// removes oldest user if users length is over 30 |
View main.go
This file contains 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
... | |
"github.com/artemis-tech/sample-graph/graph" | |
) | |
func main() { | |
port := "3030" | |
if os.Getenv("PORT") != "" { | |
port = os.Getenv("PORT") | |
} |
NewerOlder