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

Commit

Permalink
Merge branch 'master' into ui-improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrunner committed Jun 5, 2020
2 parents 9500d84 + 2109529 commit 2f6c9ca
Show file tree
Hide file tree
Showing 12 changed files with 315 additions and 423 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: go
go_import_path: github.com/heptiolabs/gangway
go:
- 1.12.x
- 1.14.x

sudo: false

Expand Down
17 changes: 6 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
FROM golang:1.12
FROM golang:1.14.2-stretch
WORKDIR /go/src/github.com/heptiolabs/gangway

RUN go get github.com/golang/dep/cmd/dep
COPY Gopkg.toml Gopkg.lock ./
RUN dep ensure -v -vendor-only

RUN go get -u github.com/mjibson/esc/...
COPY cmd cmd
COPY templates templates
COPY internal internal
COPY assets assets
COPY . .
ADD https://raw.githubusercontent.com/PrismJS/prism/v1.16.0/components/prism-bash.js assets/
ADD https://raw.githubusercontent.com/PrismJS/prism/v1.16.0/prism.js assets/
ADD https://raw.githubusercontent.com/PrismJS/prism/v1.16.0/themes/prism.css assets/
Expand All @@ -18,9 +11,11 @@ ADD https://raw.githubusercontent.com/Dogfalo/materialize/v1-dev/dist/css/materi
ADD https://raw.githubusercontent.com/Dogfalo/materialize/v1-dev/dist/js/materialize.min.js assets/
RUN esc -o cmd/gangway/bindata.go templates/ assets/

ENV GO111MODULE on
RUN go mod verify
RUN CGO_ENABLED=0 GOOS=linux go install -ldflags="-w -s" -v github.com/heptiolabs/gangway/...

FROM alpine:latest
RUN apk --no-cache add ca-certificates
FROM debian:9.12-slim
RUN apt-get update && apt-get install -y ca-certificates
USER 1001:1001
COPY --from=0 /go/bin/gangway /bin/gangway
207 changes: 0 additions & 207 deletions Gopkg.lock

This file was deleted.

38 changes: 0 additions & 38 deletions Gopkg.toml

This file was deleted.

5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ install:
go install -v ./cmd/gangway/...

setup:
go get -u github.com/golang/dep/cmd/dep
go get -u github.com/mjibson/esc/...
curl -o assets/prism-bash.js https://raw.githubusercontent.com/PrismJS/prism/v1.16.0/components/prism-bash.js
curl -o assets/prism.js https://raw.githubusercontent.com/PrismJS/prism/v1.16.0/prism.js
Expand All @@ -42,7 +41,7 @@ setup:
check: test vet gofmt staticcheck misspell

deps:
dep ensure -v
GO111MODULE=on go mod tidy && GO111MODULE=on go mod vendor && GO111MODULE=on go mod verify

vet: | test
go vet ./...
Expand All @@ -55,7 +54,7 @@ test:

staticcheck:
@go get honnef.co/go/tools/cmd/staticcheck
staticcheck -unused.whole-program $(PKGS)
staticcheck $(PKGS)

misspell:
@go get github.com/client9/misspell/cmd/misspell
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,8 @@ kube-apiserver

Requirements for building

- Go (built with 1.10)
- Go (built with version >= 1.12)
- [esc](https://github.com/mjibson/esc) for static resources.
- [dep](https://github.com/golang/dep) for dependency management.

A Makefile is provided for building tasks. The options are as follows

Expand Down
12 changes: 6 additions & 6 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ If using the example YAML, create a secret to hold this value with the following

```
kubectl -n gangway create secret generic gangway-key \
--from-literal=sesssionkey=$(openssl rand -base64 32)
--from-literal=sessionkey=$(openssl rand -base64 32)
```

## Path Prefix
Expand All @@ -41,7 +41,7 @@ It's also important to note that this guide does not include an Auth provider, t
We will use the following components:

- [gangway](https://github.com/heptiolabs/gangway): OIDC client application
- [contour](https://github.com/heptio/contour): Kubernetes Ingress controller
- [contour](https://github.com/projectcontour/contour): Kubernetes Ingress controller
- [cert-manager](https://github.com/jetstack/cert-manager): Controller for managing TLS certificates with Let's Encrypt.

### Cert-Manager
Expand All @@ -55,7 +55,7 @@ kubectl apply -f https://raw.githubusercontent.com/jetstack/cert-manager/v0.4.1/
Apply the following config to create the staging and production `ClusterIssuer` making sure to update the `email` field below with your email address:

```sh
cat <<EOF | kubectl create -f -
cat <<EOF | kubectl create -f -
apiVersion: certmanager.k8s.io/v1alpha1
kind: ClusterIssuer
metadata:
Expand Down Expand Up @@ -89,7 +89,7 @@ EOF
Run:

```sh
kubectl apply -f https://j.hept.io/contour-deployment-rbac
kubectl apply -f https://projectcontour.io/quickstart/contour.yaml
```

This will deploy Contour in the `heptio-contour` namespace, and expose it using a service of type `LoadBalancer`.
Expand All @@ -102,7 +102,7 @@ Get the hostname of the ELB that Kubernetes created for the contour service:
kubectl get svc -n heptio-contour contour -o jsonpath='{.status.loadBalancer.ingress[0].hostname}'
```

Create a wildcard CNAME record that aliases the domain under your control to the hostname of the ELB obtained above.
Create a wildcard CNAME record that aliases the domain under your control to the hostname of the ELB obtained above.

For instance, if you own `example.com`, create a CNAME record for `*.example.com`, so that you can access gangway at `https://gangway.example.com`.

Expand Down Expand Up @@ -131,7 +131,7 @@ Create the gangway cookies that are used to encrypt gangway cookies:

```sh
kubectl -n gangway create secret generic gangway-key \
--from-literal=sesssionkey=$(openssl rand -base64 32)
--from-literal=sessionkey=$(openssl rand -base64 32)
```

### Validate Certs
Expand Down
Loading

0 comments on commit 2f6c9ca

Please sign in to comment.