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
package main | |
import ( | |
"bytes" | |
"encoding/json" | |
"fmt" | |
"strings" | |
) | |
var ( |
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
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: hello | |
spec: | |
selector: | |
matchLabels: | |
app: hello | |
version: 2.0.0 | |
replicas: 3 |
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
############################ | |
# STEP 1 build static binary | |
############################ | |
FROM golang:1.18.1-alpine3.15 as builder | |
WORKDIR /workspace | |
# Fetch dependencies. | |
COPY go.mod . | |
COPY go.sum . | |
RUN go mod download | |
COPY . . |