Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

Release 0.5.2 Staging #522

Merged
merged 91 commits into from
Feb 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
2b681c6
Add fix for when we need to use the system-wide trusted CAs (#459)
Nov 18, 2022
9465b5d
build(deps): bump github.com/hashicorp/consul/api from 1.15.3 to 1.17…
dependabot[bot] Nov 21, 2022
ca999ea
build(deps): bump google.golang.org/grpc from 1.50.1 to 1.51.0 (#462)
dependabot[bot] Nov 21, 2022
3fa4a6f
Support routing to Consul services imported from a peer (#406)
nathancoleman Nov 22, 2022
cb8253f
ci: set imageEnvoy flag correctly on v1.0.0+ Consul Helm chart (#458)
mikemorris Nov 22, 2022
0346df2
build(deps): bump golang.org/x/net from 0.2.0 to 0.3.0 (#471)
dependabot[bot] Dec 6, 2022
68d2ef4
build(deps): bump golang.org/x/tools from 0.3.0 to 0.4.0 (#473)
dependabot[bot] Dec 7, 2022
c959e62
build(deps): bump golang.org/x/net from 0.3.0 to 0.4.0 (#472)
dependabot[bot] Dec 7, 2022
6950c2a
build(deps): bump github.com/hashicorp/consul/api from 1.17.0 to 1.18…
dependabot[bot] Dec 7, 2022
21bfe7e
build(deps): bump github.com/hashicorp/consul/proto-public (#469)
dependabot[bot] Dec 7, 2022
1d7ea8e
deps: bump containerd indirect dep (#400)
mikemorris Dec 7, 2022
c38ef8c
build(deps): bump github.com/hashicorp/go-hclog from 1.3.1 to 1.4.0 (…
dependabot[bot] Dec 9, 2022
b678b66
[COMPLIANCE] Add Copyright and License Headers (#470)
hashicorp-copywrite[bot] Dec 9, 2022
e268364
Fix copyright year attribute (#477)
CalebAlbers Dec 9, 2022
fc3a7d6
go: bump to Go 1.19.4 (#474)
mikemorris Dec 12, 2022
874f324
k8s/controller: always map "default" Consul namespace to empty string…
mikemorris Jan 10, 2023
24e4ad9
e2e: increase regex max program size
mikemorris Jan 24, 2023
890bcb4
e2e: make HTTP route flattening tests more exhaustive
mikemorris Jan 24, 2023
357e411
Merge pull request #487 from hashicorp/e2e/xfcc-re2-max-program-size
mikemorris Jan 26, 2023
71375ab
deps: update consul-server-connection-manager to v0.1.1
mikemorris Jan 18, 2023
bb81b1f
consul: remove globalWatcherMutex for consul-server-connection-manager
mikemorris Jan 24, 2023
9c5f806
consul: remove context cancellation from client.WatchServers
mikemorris Jan 24, 2023
fe6505c
consul: remove stop method from Consul client interface
mikemorris Jan 26, 2023
663a745
Merge pull request #484 from hashicorp/deps/cscm-default-pickfirst
mikemorris Jan 30, 2023
4c186a7
build(deps): bump github.com/docker/docker from 20.10.21+incompatible…
dependabot[bot] Jan 31, 2023
6b1a9ee
build(deps): bump sigs.k8s.io/controller-runtime from 0.13.1 to 0.14.…
dependabot[bot] Jan 31, 2023
19a1760
build(deps): bump golang.org/x/net from 0.4.0 to 0.5.0 (#492)
dependabot[bot] Feb 1, 2023
9b97183
build(deps): bump github.com/hashicorp/vault/api from 1.8.2 to 1.8.3 …
dependabot[bot] Feb 1, 2023
d1a5680
build(deps): bump sigs.k8s.io/controller-tools from 0.10.0 to 0.11.2 …
dependabot[bot] Feb 1, 2023
c136597
build(deps): bump github.com/vladimirvivien/gexe from 0.1.1 to 0.2.0 …
dependabot[bot] Feb 1, 2023
f01aed6
build(deps): bump google.golang.org/grpc from 1.51.0 to 1.52.3 (#496)
dependabot[bot] Feb 3, 2023
dd81406
build(deps): bump k8s.io/klog/v2 from 2.80.1 to 2.90.0 (#495)
dependabot[bot] Feb 3, 2023
29b01fb
build(deps): bump golang.org/x/tools from 0.4.0 to 0.5.0 (#493)
dependabot[bot] Feb 3, 2023
7368dfc
build(deps): bump sigs.k8s.io/controller-runtime from 0.14.2 to 0.14.…
dependabot[bot] Feb 6, 2023
9dd6795
build(deps): bump github.com/golangci/golangci-lint (#497)
dependabot[bot] Feb 6, 2023
632e8fb
build(deps): bump sigs.k8s.io/controller-tools from 0.11.2 to 0.11.3 …
dependabot[bot] Feb 6, 2023
30830a9
build(deps): bump google.golang.org/grpc from 1.52.3 to 1.53.0 (#500)
dependabot[bot] Feb 8, 2023
f6cf255
move installation of deps into earlier docker stage to speed up build
jm96441n Feb 9, 2023
f2c8d66
build(deps): bump golang.org/x/net from 0.5.0 to 0.6.0 (#502)
dependabot[bot] Feb 9, 2023
0a88b5c
build(deps): bump github.com/docker/docker from 20.10.23+incompatible…
dependabot[bot] Feb 9, 2023
50b1477
Merge branch 'main' into cache-deps-in-dockerfile
jm96441n Feb 9, 2023
0204bc3
Merge pull request #503 from hashicorp/cache-deps-in-dockerfile
jm96441n Feb 9, 2023
1d728c6
build(deps): bump github.com/docker/docker (#506)
dependabot[bot] Feb 10, 2023
85fb6f0
build(deps): bump github.com/hashicorp/vault/sdk from 0.7.0 to 0.8.1 …
dependabot[bot] Feb 10, 2023
df0bf5e
build(deps): bump golang.org/x/tools from 0.5.0 to 0.6.0 (#507)
dependabot[bot] Feb 10, 2023
50cba19
build(deps): bump github.com/hashicorp/vault/api from 1.8.3 to 1.9.0 …
dependabot[bot] Feb 10, 2023
b834bbc
build(deps): bump golang.org/x/net from 0.6.0 to 0.7.0 (#511)
dependabot[bot] Feb 15, 2023
6e2d8cd
redo formatting and ignore generated mocks
jm96441n Feb 10, 2023
534a3c0
Update ci workflow to check against fmt'd code
jm96441n Feb 16, 2023
8524c46
fmt by default when `make gen` is run
jm96441n Feb 16, 2023
be04844
fmt generated files
mikemorris Feb 17, 2023
257eff7
QoL add e2e make target
jm96441n Feb 17, 2023
e825b27
Merge pull request #513 from hashicorp/add-e2e-make-targets
jm96441n Feb 17, 2023
7aa0f2a
Merge branch 'main' into fmt-all-the-things
jm96441n Feb 17, 2023
aa38b28
Merge pull request #504 from hashicorp/fmt-all-the-things
jm96441n Feb 17, 2023
dc9e670
build(deps): bump github.com/hashicorp/consul-server-connection-manag…
dependabot[bot] Feb 17, 2023
3c5c52f
create cross-namespace-policy when creating a new namespace if it
jm96441n Feb 9, 2023
4d59f71
Added changelog
jm96441n Feb 9, 2023
4d4c921
cleaning up
jm96441n Feb 9, 2023
f700b30
Update changelog
jm96441n Feb 10, 2023
ece0836
Added changelog to the proper spot
jm96441n Feb 10, 2023
8d8b507
Create cross-namespace-policy if it does not exist
jm96441n Feb 15, 2023
282a463
Change getOrCreateCrossNamespacePolicy to be more in line with
jm96441n Feb 15, 2023
6e2e0fc
check for nil policy from read
jm96441n Feb 15, 2023
1404abb
Fix error check that led to a nil pointer exception
jm96441n Feb 16, 2023
0a1bdcd
Updated e2e test to check for namespace policy being applied
jm96441n Feb 16, 2023
810792a
Get partition info from env variables rather than cli flags, add comment
jm96441n Feb 17, 2023
5495997
Use existing env var for partitions
jm96441n Feb 17, 2023
62ff0c6
[COMPLIANCE] Add Copyright and License Headers (#515)
hashicorp-copywrite[bot] Feb 21, 2023
8806f0e
build(deps): bump github.com/golangci/golangci-lint (#514)
dependabot[bot] Feb 21, 2023
f78ec58
Merge pull request #505 from hashicorp/fix-bug-with-cross-namespace-p…
jm96441n Feb 22, 2023
7e5c258
build(deps): bump github.com/hashicorp/consul/sdk from 0.13.0 to 0.13…
dependabot[bot] Feb 27, 2023
2a3f024
build(deps): bump github.com/hashicorp/consul/api from 1.18.0 to 1.19…
dependabot[bot] Feb 27, 2023
e19d735
Update ACL token for e2e tests
jm96441n Feb 21, 2023
57f5929
WIP: creating new token
jm96441n Feb 24, 2023
d4e6cb0
WIP: update agent acl token
jm96441n Feb 24, 2023
66be906
Fixing token usage, cleaning up permsisions on tokens
jm96441n Feb 24, 2023
92eb5c8
Fix ACL policy of gateway for enterprise testing
jm96441n Feb 27, 2023
1fee49d
Use non-deprecated method to update agent acl token
jm96441n Feb 27, 2023
f8bbcd7
Bump default envoy image version to be compatible with consul 1.15
jm96441n Feb 27, 2023
a08579c
Regen golden files after change to envoy image in tests
jm96441n Feb 27, 2023
97b52c5
Fix default envoy image used for e2e testing for gateways
jm96441n Feb 27, 2023
7bb5cc8
Fix golden files for envoy image
jm96441n Feb 27, 2023
a9b05f2
build(deps): bump github.com/hashicorp/consul/proto-public (#519)
dependabot[bot] Feb 28, 2023
12e1ba9
build(deps): bump github.com/stretchr/testify from 1.8.1 to 1.8.2 (#520)
dependabot[bot] Feb 28, 2023
87c7391
Merge pull request #516 from hashicorp/update-acl-token-for-e2e-tests
jm96441n Feb 28, 2023
64a6875
Bump default envoy image (#521)
jm96441n Feb 28, 2023
520f8a0
Merge branch 'main' of https://github.com/hashicorp/polar into releas…
Feb 28, 2023
73315b7
Rev version
Feb 28, 2023
ec4020b
run make fmt
Feb 28, 2023
79d544f
regenerate mocks
Feb 28, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/470.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
Add initial set of copyright headers to applicable files
```
3 changes: 3 additions & 0 deletions .changelog/474.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
go: build with Go v1.19.4
```
3 changes: 3 additions & 0 deletions .changelog/483.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
consul: fix Consul Enterprise gateway sync issue with Kubernetes namespace mirroring disabled and the Consul destination namespace set to "default"
```
3 changes: 3 additions & 0 deletions .changelog/505.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
Fix `cross-namespace-policy` not being applied to namespaces created by the controller.
```
3 changes: 3 additions & 0 deletions .changelog/521.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
Bump the default envoy image for consul 1.15 compatability when the image is not specified in a GatewayClassConfig
```
16 changes: 16 additions & 0 deletions .copywrite.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
schema_version = 1

project {
license = "MPL-2.0"
copyright_year = 2021

# (OPTIONAL) A list of globs that should not have copyright or license headers .
# Supports doublestar glob patterns for more flexibility in defining which
# files or folders should be ignored
# Default: []
header_ignore = [
"config/rbac/role.yaml",
"config/crd/bases/*.yaml",
"**/testdata/**.golden.yaml"
]
}
3 changes: 3 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

blank_issues_enabled: false
contact_links:
- name: Consul Discuss Forum
Expand Down
3 changes: 3 additions & 0 deletions .github/actions/goenv/action.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

name: "Setup Go Environment"
description: "Setup a go environment with caching"
inputs:
Expand Down
3 changes: 3 additions & 0 deletions .github/actions/setup-eks/action.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

name: "Setup EKS"
description: "Installs eksctl, configures AWS credentials in the workflow's environment and sets up an EKS cluster."
inputs:
Expand Down
3 changes: 3 additions & 0 deletions .github/actions/setup-eks/cluster.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

variable "cluster_name" {
type = string
nullable = false
Expand Down
3 changes: 3 additions & 0 deletions .github/actions/setup-kind/action.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

name: "Setup Kind"
description: "Setup a Kind cluster with MetalLB for ingress"
inputs:
Expand Down
3 changes: 3 additions & 0 deletions .github/actions/teardown-eks/action.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

name: "Tear down EKS"
description: "Tears down an EKS cluster. Requires eksctl and credentials in the workflow's environment from the setup-eks action."
inputs:
Expand Down
3 changes: 3 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

version: 2
updates:
- package-ecosystem: gomod
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
matrix:
goos: ["linux"]
goarch: ["arm", "arm64", "386", "amd64"]
go: ["1.19.2"]
go: ["1.19.4"]
fail-fast: true

name: Go ${{ matrix.go }} ${{ matrix.goos }} ${{ matrix.goarch }} build
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,15 @@ jobs:
tar xvzf kustomize_v4.4.0_linux_amd64.tar.gz
mv kustomize /usr/local/bin/kustomize
rm kustomize_v4.4.0_linux_amd64.tar.gz
docker version
- uses: ./.github/actions/goenv
with:
go-version: ${{ env.GO_VERSION }}

- name: Test
env:
DOCKER_HOST_ROUTE: 172.17.0.1
DOCKER_API_VERSION: 1.41
E2E_APIGW_CONSUL_IMAGE: ${{ matrix.consul-image }}
run: |
mkdir -p $TEST_RESULTS_DIR/json
Expand Down
18 changes: 11 additions & 7 deletions .github/workflows/conformance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,25 @@ jobs:
consul-image: "hashicorp/consul:1.12"
envoy-image: "envoyproxy/envoy:v1.22-latest"
consul-k8s-version: "v0.49.1"
envoy-field: "global.imageEnvoy"
- name: "consul@v1.13 + consul-k8s@v0.49.1"
api-gateway-image: "hashicorppreview/consul-api-gateway:0.5-dev"
consul-image: "hashicorp/consul:1.13"
envoy-image: "envoyproxy/envoy:v1.22-latest"
consul-k8s-version: "v0.49.1"
- name: "consul@v1.14-dev + consul-k8s@v1.0.0"
envoy-field: "global.imageEnvoy"
- name: "consul@v1.14 + consul-k8s@v1.0.1"
api-gateway-image: "hashicorppreview/consul-api-gateway:0.5-dev"
consul-image: "hashicorp/consul:1.14"
envoy-image: "envoyproxy/envoy:v1.22-latest"
consul-k8s-version: "main"
- name: "consul@v1.15-dev + consul-k8s@v1.0.0"
envoy-image: "envoyproxy/envoy:v1.24-latest"
consul-k8s-version: "v1.0.1"
envoy-field: "apiGateway.imageEnvoy"
- name: "consul@v1.15-dev + consul-k8s@v1.0.1"
api-gateway-image: "hashicorppreview/consul-api-gateway:0.5-dev"
consul-image: "hashicorppreview/consul:1.15-dev"
envoy-image: "envoyproxy/envoy:v1.22-latest"
consul-k8s-version: "main"
envoy-image: "envoyproxy/envoy:v1.24-latest"
consul-k8s-version: "v1.0.1"
envoy-field: "apiGateway.imageEnvoy"
fail-fast: false
name: "${{ matrix.cluster-type }} - ${{ matrix.config.name }}"
concurrency:
Expand Down Expand Up @@ -106,7 +110,7 @@ jobs:
- name: Install Consul
working-directory: "consul-api-gateway/internal/testing/conformance"
run: |
helm install --values ./consul-config.yaml consul $GITHUB_WORKSPACE/consul-k8s/charts/consul --set global.image=${{ matrix.config.consul-image }} --set global.imageEnvoy=${{ matrix.config.envoy-image }} --set apiGateway.image=${{ matrix.config.api-gateway-image }} --create-namespace --namespace=consul
helm install --values ./consul-config.yaml consul $GITHUB_WORKSPACE/consul-k8s/charts/consul --set global.image=${{ matrix.config.consul-image }} --set ${{ matrix.config.envoy-field }}=${{ matrix.config.envoy-image }} --set apiGateway.image=${{ matrix.config.api-gateway-image }} --create-namespace --namespace=consul
kubectl wait --for=condition=Ready --timeout=120s --namespace=consul pods --all

- name: Patch testing resources
Expand Down
18 changes: 11 additions & 7 deletions .github/workflows/conformance_with_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,25 @@ jobs:
consul-image: "hashicorp/consul:1.12"
envoy-image: "envoyproxy/envoy:v1.22-latest"
consul-k8s-version: "v0.49.1"
envoy-field: "global.imageEnvoy"
- name: "consul@v1.13 + consul-k8s@v0.49.1"
api-gateway-image: "consul-api-gateway:local-build"
consul-image: "hashicorp/consul:1.13"
envoy-image: "envoyproxy/envoy:v1.22-latest"
consul-k8s-version: "v0.49.1"
- name: "consul@v1.14 + consul-k8s@v1.0.0"
envoy-field: "global.imageEnvoy"
- name: "consul@v1.14 + consul-k8s@v1.0.1"
api-gateway-image: "consul-api-gateway:local-build"
consul-image: "hashicorp/consul:1.14"
envoy-image: "envoyproxy/envoy:v1.22-latest"
consul-k8s-version: "main"
- name: "consul@v1.15-dev + consul-k8s@v1.0.0"
envoy-image: "envoyproxy/envoy:v1.24-latest"
consul-k8s-version: "v1.0.1"
envoy-field: "apiGateway.imageEnvoy"
- name: "consul@v1.15-dev + consul-k8s@v1.0.1"
api-gateway-image: "consul-api-gateway:local-build"
consul-image: "hashicorppreview/consul:1.15-dev"
envoy-image: "envoyproxy/envoy:v1.22-latest"
consul-k8s-version: "main"
envoy-image: "envoyproxy/envoy:v1.24-latest"
consul-k8s-version: "v1.0.1"
envoy-field: "apiGateway.imageEnvoy"
fail-fast: false
name: "${{ matrix.config.name }}"

Expand Down Expand Up @@ -119,7 +123,7 @@ jobs:
- name: Install Consul
working-directory: "consul-api-gateway/internal/testing/conformance"
run: |
helm install --values ./consul-config.yaml consul $GITHUB_WORKSPACE/consul-k8s/charts/consul --set global.image=${{ matrix.config.consul-image }} --set global.imageEnvoy=${{ matrix.config.envoy-image }} --set apiGateway.image=${{ matrix.config.api-gateway-image }} --create-namespace --namespace=consul
helm install --values ./consul-config.yaml consul $GITHUB_WORKSPACE/consul-k8s/charts/consul --set global.image=${{ matrix.config.consul-image }} --set ${{ matrix.config.envoy-field }}=${{ matrix.config.envoy-image }} --set apiGateway.image=${{ matrix.config.api-gateway-image }} --create-namespace --namespace=consul
kubectl wait --for=condition=Ready --timeout=60s --namespace=consul pods --all

- name: Patch testing resources
Expand Down
3 changes: 3 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

linters:
disable-all: true
enable:
Expand Down
3 changes: 3 additions & 0 deletions .release/ci.hcl
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

schema = "1"

project "consul-api-gateway" {
Expand Down
3 changes: 3 additions & 0 deletions .release/release-metadata.hcl
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

url_docker_registry_dockerhub = "https://hub.docker.com/r/hashicorp/consul-api-gateway"
url_license = "https://github.com/hashicorp/consul-api-gateway/blob/main/LICENSE"
url_project_website = "https://developer.hashicorp.com/consul/docs/api-gateway"
Expand Down
3 changes: 3 additions & 0 deletions .release/security-scan.hcl
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

container {
dependencies = true
alpine_secdb = true
Expand Down
13 changes: 11 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
FROM golang:1.19.1-alpine as go-discover
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

FROM golang:1.19.4-alpine as go-discover
RUN CGO_ENABLED=0 go install github.com/hashicorp/go-discover/cmd/discover@49f60c093101c9c5f6b04d5b1c80164251a761a6

# ===================================
Expand All @@ -7,10 +10,16 @@ RUN CGO_ENABLED=0 go install github.com/hashicorp/go-discover/cmd/discover@49f60
#
# ===================================

# devdeps installs deps so we don't need to do it each time
FROM golang:latest as devdeps
ARG BIN_NAME
WORKDIR /build
COPY go.mod go.sum ./
RUN go mod download

# devbuild compiles the binary
# -----------------------------------
FROM golang:latest AS devbuild
FROM devdeps AS devbuild
ARG BIN_NAME
# Escape the GOPATH
WORKDIR /build
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.local
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.19.1-alpine as go-discover
FROM golang:1.19.4-alpine as go-discover
RUN CGO_ENABLED=0 go install github.com/hashicorp/go-discover/cmd/discover@49f60c093101c9c5f6b04d5b1c80164251a761a6

FROM alpine:latest
Expand Down
10 changes: 8 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ GOIMPORTS=$(shell which goimports)

.PHONY: fmt
fmt: goimports
@for d in $$(go list -f {{.Dir}} ./...); do ${GOIMPORTS} --local github.com/hashicorp --local github.com/hashicorp/consul-api-gateway -w -l $$d/*.go; done
@for d in $$(go list -f {{.Dir}} ./...); do ${GOIMPORTS} --local github.com/hashicorp/consul-api-gateway,github.com/hashicorp -w -l $$d/*.go; done

.PHONY: lint
lint:
Expand All @@ -50,13 +50,19 @@ endif
test:
go test ./...

# Run e2e tests, takes an optional variable `consul_image` which specifies the consul image to test against
.PHONY: e2e
e2e:
E2E_APIGW_CONSUL_IMAGE=$(consul_image) ./scripts/e2e_local.sh


generate-golden-files:
GENERATE=true go test ./internal/adapters/consul
GENERATE=true go test ./internal/envoy
GENERATE=true go test ./internal/k8s/builder

.PHONY: gen
gen: generate-golden-files ctrl-generate ctrl-manifests
gen: generate-golden-files ctrl-generate ctrl-manifests fmt
ifeq (, $(shell which mockgen))
@go install github.com/golang/mock/mockgen
endif
Expand Down
3 changes: 3 additions & 0 deletions config/base/gateway-class-config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

---
apiVersion: api-gateway.consul.hashicorp.com/v1alpha1
kind: GatewayClassConfig
Expand Down
3 changes: 3 additions & 0 deletions config/base/gateway-class.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

---
apiVersion: gateway.networking.k8s.io/v1alpha2
kind: GatewayClass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.10.0
controller-gen.kubebuilder.io/version: v0.11.3
creationTimestamp: null
name: gatewayclassconfigs.api-gateway.consul.hashicorp.com
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.10.0
controller-gen.kubebuilder.io/version: v0.11.3
creationTimestamp: null
name: meshservices.api-gateway.consul.hashicorp.com
spec:
Expand Down
3 changes: 3 additions & 0 deletions config/crd/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

Expand Down
3 changes: 3 additions & 0 deletions config/deployment/clusterrolebinding.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
Expand Down
3 changes: 3 additions & 0 deletions config/deployment/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

---
apiVersion: apps/v1
kind: Deployment
Expand Down
3 changes: 3 additions & 0 deletions config/deployment/service.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

---
apiVersion: v1
kind: Service
Expand Down
3 changes: 3 additions & 0 deletions config/deployment/serviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

---
apiVersion: v1
kind: ServiceAccount
Expand Down
3 changes: 3 additions & 0 deletions config/example/certificates.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

---
apiVersion: v1
kind: Secret
Expand Down
3 changes: 3 additions & 0 deletions config/example/external-dns.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

---
apiVersion: v1
kind: ServiceAccount
Expand Down
3 changes: 3 additions & 0 deletions config/example/gateway.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

---
apiVersion: gateway.networking.k8s.io/v1alpha2
kind: Gateway
Expand Down
3 changes: 3 additions & 0 deletions config/example/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

Expand Down
3 changes: 3 additions & 0 deletions config/example/route.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

---
apiVersion: gateway.networking.k8s.io/v1alpha2
kind: HTTPRoute
Expand Down
3 changes: 3 additions & 0 deletions config/example/service.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

---
apiVersion: consul.hashicorp.com/v1alpha1
kind: ServiceDefaults
Expand Down
3 changes: 3 additions & 0 deletions config/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

Expand Down
Loading