-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 350b1f8
Showing
25 changed files
with
2,424 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
#### Terraform .gitignore template | ||
## Comment path that would like to get ignored | ||
|
||
### Basic .gitignore | ||
# **/terraform.tfstate | ||
**/terraform.tfstate.backup | ||
**/terraform.tfplan | ||
**/.terraform/** | ||
**/terraform.tfstate.d/** | ||
**/*.tfplan | ||
**/terraform_plugins/** | ||
backend.hcl | ||
*.hcl | ||
*.lock.hcl | ||
# only for snd | ||
#backend.tf | ||
#*.tfvars | ||
|
||
### https://raw.githubusercontent.com/hashicorp/terraform/master/.gitignore | ||
*.dll | ||
*.exe | ||
.DS_Store | ||
example.tf | ||
terraform.tfplan | ||
terraform.tfstate | ||
tf.out | ||
.vagrant/ | ||
*.backup | ||
./*.tfstate | ||
errored.tfstate | ||
.terraform/ | ||
*.log | ||
*.bak | ||
*~ | ||
.*.swp | ||
.idea | ||
*.iml | ||
*.test | ||
*.iml | ||
#.envrc | ||
|
||
### https://raw.github.com/github/gitignore/abad92dac5a4306f72242dae3bca6e277bce3615/Global/Vim.gitignore | ||
|
||
# swap | ||
[._]*.s[a-w][a-z] | ||
[._]s[a-w][a-z] | ||
# session | ||
Session.vim | ||
# temporary | ||
.netrwhist | ||
*~ | ||
# auto-generated tag files | ||
tags | ||
|
||
### Ignore .DS_Store on MAC | ||
.DS_Store | ||
.DS_Store? | ||
|
||
### Temporary dir for CodeDeploy | ||
build/ | ||
.build | ||
dummy.zip | ||
|
||
terraform.tfstate* | ||
*.tgz | ||
*.pem | ||
*.pub | ||
*.env | ||
*.icloud | ||
*.id_rsa | ||
logs | ||
.idea | ||
dist | ||
|
||
terraform/modules/** | ||
test/** |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# This is an example goreleaser.yaml file with some sane defaults. | ||
# Make sure to check the documentation at http://goreleaser.com | ||
before: | ||
hooks: | ||
# You may remove this if you don't use go modules. | ||
- go mod download | ||
|
||
builds: | ||
- id: "k8s-context" | ||
main: ./src/main.go | ||
env: | ||
# - GOOS=linux | ||
# - GOARCH=amd64 | ||
- CGO_ENABLED=0 | ||
goos: | ||
- linux | ||
- windows | ||
- darwin | ||
|
||
archives: | ||
- id: "archive-k8s-context" | ||
name_template: "authc_{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}" | ||
builds: # Builds reference which build instances should be archived in this archive. | ||
- "goapp" | ||
replacements: | ||
darwin: Darwin | ||
linux: Linux | ||
windows: Windows | ||
386: i386 | ||
amd64: x86_64 | ||
allow_different_binary_count: true | ||
|
||
checksum: | ||
name_template: 'checksums.txt' | ||
|
||
snapshot: | ||
name_template: "{{ .Tag }}-next" | ||
|
||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- '^docs:' | ||
- '^test:' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Kubernetes Change Context (k8s-context) | ||
|
||
Customize Kubernetes Change Context (KUBECONFIG) | ||
|
||
 | ||
 | ||
 | ||
[](https://hub.docker.com/r/devopscorner/k8s-context/) | ||
 | ||
 | ||
 | ||
 | ||
 | ||
 | ||
 | ||
[](https://img.shields.io/github/license/devopscorner/k8s-context) | ||
|
||
## Available Tags | ||
|
||
### Alpine | ||
|
||
| Image name | Size | | ||
|------------|------| | ||
| `devopscorner/k8s-context:latest` | [](https://hub.docker.com/repository/docker/devopscorner/k8s-context/tags?page=1&ordering=last_updated&name=latest) | | ||
| `devopscorner/k8s-context:alpine` | [](https://hub.docker.com/repository/docker/devopscorner/k8s-context/tags?page=1&ordering=last_updated&name=alpine) | | ||
| `devopscorner/k8s-context:alpine-latest` | [](https://hub.docker.com/repository/docker/devopscorner/k8s-context/tags?page=1&ordering=last_updated&name=alpine-latest) | | ||
| `devopscorner/k8s-context:alpine-3.15` | [](https://hub.docker.com/repository/docker/devopscorner/k8s-context/tags?page=1&ordering=last_updated&name=alpine-3.15) | | ||
| `devopscorner/k8s-context:go1.19-alpine3.15` | [](https://hub.docker.com/repository/docker/devopscorner/k8s-context/tags?page=1&ordering=last_updated&name=go1.19-alpine3.15) | | ||
| `devopscorner/k8s-context:go1.19.3-alpine3.15` | [](https://hub.docker.com/repository/docker/devopscorner/k8s-context/tags?page=1&ordering=last_updated&name=go1.19.3-alpine3.15) | | ||
| `devopscorner/k8s-context:alpine-3.16` | [](https://hub.docker.com/repository/docker/devopscorner/k8s-context/tags?page=1&ordering=last_updated&name=alpine-3.16) | | ||
| `devopscorner/k8s-context:go1.19-alpine3.16` | [](https://hub.docker.com/repository/docker/devopscorner/k8s-context/tags?page=1&ordering=last_updated&name=go1.19-alpine3.16) | | ||
| `devopscorner/k8s-context:go1.19.5-alpine3.16` | [](https://hub.docker.com/repository/docker/devopscorner/k8s-context/tags?page=1&ordering=last_updated&name=go1.19.5-alpine3.16) | | ||
| `devopscorner/k8s-context:alpine-3.17` | [](https://hub.docker.com/repository/docker/devopscorner/k8s-context/tags?page=1&ordering=last_updated&name=alpine-3.17) | | ||
| `devopscorner/k8s-context:go1.19-alpine3.17` | [](https://hub.docker.com/repository/docker/devopscorner/k8s-context/tags?page=1&ordering=last_updated&name=go1.19-alpine3.17) | | ||
| `devopscorner/k8s-context:go1.19.5-alpine3.17` | [](https://hub.docker.com/repository/docker/devopscorner/k8s-context/tags?page=1&ordering=last_updated&name=go1.19.5-alpine3.17) | | ||
|
||
|
||
--- | ||
|
||
### version 1.0 | ||
|
||
- First deployment GO Apps | ||
- Script build image | ||
- Script ecr-tag & ecr-push | ||
- Helm deployment values | ||
- Upgrade gomod, using GO `1.17` | ||
- Dockerfile using `golang:1.17-alpine3.15` |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
### Builder ### | ||
FROM golang:1.19.5-alpine3.17 as builder | ||
|
||
WORKDIR /go/src/app | ||
ENV GIN_MODE=release | ||
ENV GOPATH=/go | ||
|
||
RUN apk add --no-cache \ | ||
build-base \ | ||
git \ | ||
curl \ | ||
make \ | ||
bash | ||
|
||
COPY src /go/src/app | ||
|
||
RUN GOOS=linux GOARCH=amd64 CGO_ENABLED=0 \ | ||
cd /go/src/app && \ | ||
go build -mod=readonly -ldflags="-s -w" -o goapp | ||
|
||
### Binary ### | ||
FROM golang:1.19.5-alpine3.17 | ||
|
||
ARG BUILD_DATE | ||
ARG BUILD_VERSION | ||
ARG GIT_COMMIT | ||
ARG GIT_URL | ||
|
||
ENV VENDOR="DevOpsCornerId" | ||
ENV AUTHOR="DevOpsCorner.id <[email protected]>" | ||
ENV IMG_NAME="alpine" | ||
ENV IMG_VERSION="3.17" | ||
ENV IMG_DESC="Docker GO App Alpine 3.17" | ||
ENV IMG_ARCH="amd64/x86_64" | ||
|
||
ENV ALPINE_VERSION="3.17" | ||
|
||
LABEL maintainer="$AUTHOR" \ | ||
architecture="$IMG_ARCH" \ | ||
ubuntu-version="$ALPINE_VERSION" \ | ||
org.label-schema.build-date="$BUILD_DATE" \ | ||
org.label-schema.name="$IMG_NAME" \ | ||
org.label-schema.description="$IMG_DESC" \ | ||
org.label-schema.vcs-ref="$GIT_COMMIT" \ | ||
org.label-schema.vcs-url="$GIT_URL" \ | ||
org.label-schema.vendor="$VENDOR" \ | ||
org.label-schema.version="$BUILD_VERSION" \ | ||
org.label-schema.schema-version="$IMG_VERSION" \ | ||
org.opencontainers.image.authors="$AUTHOR" \ | ||
org.opencontainers.image.description="$IMG_DESC" \ | ||
org.opencontainers.image.vendor="$VENDOR" \ | ||
org.opencontainers.image.version="$IMG_VERSION" \ | ||
org.opencontainers.image.revision="$GIT_COMMIT" \ | ||
org.opencontainers.image.created="$BUILD_DATE" \ | ||
fr.hbis.docker.base.build-date="$BUILD_DATE" \ | ||
fr.hbis.docker.base.name="$IMG_NAME" \ | ||
fr.hbis.docker.base.vendor="$VENDOR" \ | ||
fr.hbis.docker.base.version="$BUILD_VERSION" | ||
|
||
ENV GIN_MODE=release | ||
COPY --from=builder /go/src/app/goapp /usr/local/bin/goapp | ||
|
||
ENTRYPOINT ["/usr/local/bin/goapp"] | ||
EXPOSE 8080 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
### Builder ### | ||
FROM golang:1.19.3-alpine3.15 as builder | ||
|
||
WORKDIR /go/src/app | ||
ENV GIN_MODE=release | ||
ENV GOPATH=/go | ||
|
||
RUN apk add --no-cache \ | ||
build-base \ | ||
git \ | ||
curl \ | ||
make \ | ||
bash | ||
|
||
COPY src /go/src/app | ||
|
||
RUN GOOS=linux GOARCH=amd64 CGO_ENABLED=0 \ | ||
cd /go/src/app && \ | ||
go build -mod=readonly -ldflags="-s -w" -o goapp | ||
|
||
### Binary ### | ||
FROM golang:1.19.3-alpine3.15 | ||
|
||
ARG BUILD_DATE | ||
ARG BUILD_VERSION | ||
ARG GIT_COMMIT | ||
ARG GIT_URL | ||
|
||
ENV VENDOR="DevOpsCornerId" | ||
ENV AUTHOR="DevOpsCorner.id <[email protected]>" | ||
ENV IMG_NAME="alpine" | ||
ENV IMG_VERSION="3.15" | ||
ENV IMG_DESC="Docker GO App Alpine 3.15" | ||
ENV IMG_ARCH="amd64/x86_64" | ||
|
||
ENV ALPINE_VERSION="3.15" | ||
|
||
LABEL maintainer="$AUTHOR" \ | ||
architecture="$IMG_ARCH" \ | ||
ubuntu-version="$ALPINE_VERSION" \ | ||
org.label-schema.build-date="$BUILD_DATE" \ | ||
org.label-schema.name="$IMG_NAME" \ | ||
org.label-schema.description="$IMG_DESC" \ | ||
org.label-schema.vcs-ref="$GIT_COMMIT" \ | ||
org.label-schema.vcs-url="$GIT_URL" \ | ||
org.label-schema.vendor="$VENDOR" \ | ||
org.label-schema.version="$BUILD_VERSION" \ | ||
org.label-schema.schema-version="$IMG_VERSION" \ | ||
org.opencontainers.image.authors="$AUTHOR" \ | ||
org.opencontainers.image.description="$IMG_DESC" \ | ||
org.opencontainers.image.vendor="$VENDOR" \ | ||
org.opencontainers.image.version="$IMG_VERSION" \ | ||
org.opencontainers.image.revision="$GIT_COMMIT" \ | ||
org.opencontainers.image.created="$BUILD_DATE" \ | ||
fr.hbis.docker.base.build-date="$BUILD_DATE" \ | ||
fr.hbis.docker.base.name="$IMG_NAME" \ | ||
fr.hbis.docker.base.vendor="$VENDOR" \ | ||
fr.hbis.docker.base.version="$BUILD_VERSION" | ||
|
||
ENV GIN_MODE=release | ||
COPY --from=builder /go/src/app/goapp /usr/local/bin/goapp | ||
|
||
ENTRYPOINT ["/usr/local/bin/goapp"] | ||
EXPOSE 8080 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
### Builder ### | ||
FROM golang:1.19.5-alpine3.16 as builder | ||
|
||
WORKDIR /go/src/app | ||
ENV GIN_MODE=release | ||
ENV GOPATH=/go | ||
|
||
RUN apk add --no-cache \ | ||
build-base \ | ||
git \ | ||
curl \ | ||
make \ | ||
bash | ||
|
||
COPY src /go/src/app | ||
|
||
RUN GOOS=linux GOARCH=amd64 CGO_ENABLED=0 \ | ||
cd /go/src/app && \ | ||
go build -mod=readonly -ldflags="-s -w" -o goapp | ||
|
||
### Binary ### | ||
FROM golang:1.19.5-alpine3.16 | ||
|
||
ARG BUILD_DATE | ||
ARG BUILD_VERSION | ||
ARG GIT_COMMIT | ||
ARG GIT_URL | ||
|
||
ENV VENDOR="DevOpsCornerId" | ||
ENV AUTHOR="DevOpsCorner.id <[email protected]>" | ||
ENV IMG_NAME="alpine" | ||
ENV IMG_VERSION="3.16" | ||
ENV IMG_DESC="Docker GO App Alpine 3.16" | ||
ENV IMG_ARCH="amd64/x86_64" | ||
|
||
ENV ALPINE_VERSION="3.16" | ||
|
||
LABEL maintainer="$AUTHOR" \ | ||
architecture="$IMG_ARCH" \ | ||
ubuntu-version="$ALPINE_VERSION" \ | ||
org.label-schema.build-date="$BUILD_DATE" \ | ||
org.label-schema.name="$IMG_NAME" \ | ||
org.label-schema.description="$IMG_DESC" \ | ||
org.label-schema.vcs-ref="$GIT_COMMIT" \ | ||
org.label-schema.vcs-url="$GIT_URL" \ | ||
org.label-schema.vendor="$VENDOR" \ | ||
org.label-schema.version="$BUILD_VERSION" \ | ||
org.label-schema.schema-version="$IMG_VERSION" \ | ||
org.opencontainers.image.authors="$AUTHOR" \ | ||
org.opencontainers.image.description="$IMG_DESC" \ | ||
org.opencontainers.image.vendor="$VENDOR" \ | ||
org.opencontainers.image.version="$IMG_VERSION" \ | ||
org.opencontainers.image.revision="$GIT_COMMIT" \ | ||
org.opencontainers.image.created="$BUILD_DATE" \ | ||
fr.hbis.docker.base.build-date="$BUILD_DATE" \ | ||
fr.hbis.docker.base.name="$IMG_NAME" \ | ||
fr.hbis.docker.base.vendor="$VENDOR" \ | ||
fr.hbis.docker.base.version="$BUILD_VERSION" | ||
|
||
ENV GIN_MODE=release | ||
COPY --from=builder /go/src/app/goapp /usr/local/bin/goapp | ||
|
||
ENTRYPOINT ["/usr/local/bin/goapp"] | ||
EXPOSE 8080 |
Oops, something went wrong.