-
Notifications
You must be signed in to change notification settings - Fork 326
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
Showing
16 changed files
with
562 additions
and
74 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,3 @@ | ||
```release-note:bug | ||
cli: fix issue where the `consul-k8s proxy list` command does not include API gateways. | ||
``` |
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
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
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,5 @@ | ||
# Copyright (c) HashiCorp, Inc. | ||
# SPDX-License-Identifier: MPL-2.0 | ||
|
||
# Cloud package is not included in test suite as it is triggered from a non consul-k8s repo and requires HCP credentials | ||
- {runner: 0, test-packages: "openshift"} |
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
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
59 changes: 59 additions & 0 deletions
59
acceptance/tests/fixtures/cases/openshift/basic/backend.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: backend | ||
--- | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: backend | ||
namespace: backend | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: backend | ||
namespace: backend | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: backend | ||
replicas: 1 | ||
template: | ||
metadata: | ||
labels: | ||
app: backend | ||
annotations: | ||
consul.hashicorp.com/connect-inject: "true" | ||
spec: | ||
serviceAccountName: backend | ||
containers: | ||
- name: backend | ||
image: nicholasjackson/fake-service:v0.26.0 | ||
ports: | ||
- containerPort: 8080 | ||
env: | ||
- name: LISTEN_ADDR | ||
value: "0.0.0.0:8080" | ||
- name: NAME | ||
value: backend | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: backend | ||
namespace: backend | ||
spec: | ||
type: ClusterIP | ||
selector: | ||
app: backend | ||
ports: | ||
- port: 8080 | ||
--- | ||
apiVersion: consul.hashicorp.com/v1alpha1 | ||
kind: ServiceDefaults | ||
metadata: | ||
name: backend | ||
namespace: backend | ||
spec: | ||
protocol: http |
62 changes: 62 additions & 0 deletions
62
acceptance/tests/fixtures/cases/openshift/basic/frontend.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: frontend | ||
--- | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: frontend | ||
namespace: frontend | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: frontend | ||
namespace: frontend | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: frontend | ||
replicas: 1 | ||
template: | ||
metadata: | ||
labels: | ||
app: frontend | ||
annotations: | ||
consul.hashicorp.com/connect-inject: "true" | ||
spec: | ||
serviceAccountName: frontend | ||
containers: | ||
- name: frontend | ||
image: nicholasjackson/fake-service:v0.26.0 | ||
ports: | ||
- containerPort: 8080 | ||
env: | ||
- name: LISTEN_ADDR | ||
value: "0.0.0.0:8080" | ||
- name: NAME | ||
value: frontend | ||
- name: UPSTREAM_URIS | ||
value: 'http://backend.backend:8080' | ||
|
||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: frontend | ||
namespace: frontend | ||
spec: | ||
type: ClusterIP | ||
selector: | ||
app: frontend | ||
ports: | ||
- port: 8080 | ||
--- | ||
apiVersion: consul.hashicorp.com/v1alpha1 | ||
kind: ServiceDefaults | ||
metadata: | ||
name: frontend | ||
namespace: frontend | ||
spec: | ||
protocol: http |
15 changes: 15 additions & 0 deletions
15
acceptance/tests/fixtures/cases/openshift/basic/gateway.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
apiVersion: gateway.networking.k8s.io/v1beta1 | ||
kind: Gateway | ||
metadata: | ||
name: api-gateway | ||
namespace: consul | ||
spec: | ||
gatewayClassName: consul | ||
listeners: | ||
- name: https | ||
protocol: HTTPS | ||
port: 443 | ||
tls: | ||
certificateRefs: | ||
- name: consul-server-cert | ||
namespace: consul |
23 changes: 23 additions & 0 deletions
23
acceptance/tests/fixtures/cases/openshift/basic/intentions.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
apiVersion: consul.hashicorp.com/v1alpha1 | ||
kind: ServiceIntentions | ||
metadata: | ||
name: to-backend-default | ||
namespace: default | ||
spec: | ||
destination: | ||
name: backend | ||
sources: | ||
- name: frontend | ||
action: allow | ||
--- | ||
apiVersion: consul.hashicorp.com/v1alpha1 | ||
kind: ServiceIntentions | ||
metadata: | ||
name: to-frontend-default | ||
namespace: default | ||
spec: | ||
destination: | ||
name: frontend | ||
sources: | ||
- name: api-gateway | ||
action: allow |
30 changes: 30 additions & 0 deletions
30
acceptance/tests/fixtures/cases/openshift/basic/route.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
apiVersion: gateway.networking.k8s.io/v1beta1 | ||
kind: HTTPRoute | ||
metadata: | ||
name: frontend-route-default | ||
namespace: consul | ||
spec: | ||
parentRefs: | ||
- name: api-gateway | ||
rules: | ||
- backendRefs: | ||
- kind: Service | ||
name: frontend | ||
namespace: frontend | ||
port: 8080 | ||
|
||
--- | ||
apiVersion: gateway.networking.k8s.io/v1beta1 | ||
kind: ReferenceGrant | ||
metadata: | ||
name: service-grant | ||
namespace: frontend | ||
spec: | ||
from: | ||
- group: gateway.networking.k8s.io | ||
kind: HTTPRoute | ||
namespace: consul | ||
to: | ||
- group: "" | ||
kind: Service | ||
name: frontend |
Oops, something went wrong.