forked from k8sgateway/k8sgateway
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: soloio-bulldozer[bot] <48420018+soloio-bulldozer[bot]@users.noreply.github.com> Co-authored-by: Jenny Shu <28537278+jenshu@users.noreply.github.com>
- Loading branch information
1 parent
3f99c52
commit 22e6f2c
Showing
28 changed files
with
171 additions
and
14 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
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 @@ | ||
changelog: | ||
- type: NEW_FEATURE | ||
description: Adds a common category to all Gloo Gateway CRDs. `kubectl get gloo-gateway -A` can now be used to list all GG CRs on your cluster. Also adds the "solo-io" category to GG enterprise CRDs. | ||
issueLink: https://github.com/solo-io/solo-projects/issues/6605 | ||
resolvesIssue: false |
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 |
---|---|---|
|
@@ -28,3 +28,6 @@ | |
# generator files | ||
*.go | ||
generate/ | ||
|
||
# READMEs | ||
README.md |
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,10 @@ | ||
The CRDs in this directory are partially generated by solo-kit. | ||
That implementation is explained [here](https://github.com/solo-io/solo-kit/tree/main/pkg/code-generator/schemagen#implementation). | ||
|
||
It is worth noting that solo-kit only generates the schemas for these CRDs. | ||
Other spec fields such as the `categories` can be updated manually. | ||
|
||
Gloo Gateway CRD `categories`: | ||
- All Gloo Gateway CRDs should include the "gloo-gateway" category. | ||
- Any Gloo Gateway CRDs which are only used by enterprise customers should additionally include the "solo-io" category. | ||
- Currently, these are the AuthConfig, RateLimitConfig, and GraphQLApi CRDs. |
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
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
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
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
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
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,54 @@ | ||
package crd_categories | ||
|
||
import ( | ||
"bytes" | ||
"context" | ||
"io" | ||
"strings" | ||
|
||
"github.com/solo-io/gloo/test/kubernetes/e2e" | ||
"github.com/solo-io/gloo/test/kubernetes/e2e/features/helm" | ||
"github.com/stretchr/testify/suite" | ||
) | ||
|
||
var _ e2e.NewSuiteFunc = NewTestingSuite | ||
|
||
type testingSuite struct { | ||
suite.Suite | ||
ctx context.Context | ||
ti *e2e.TestInstallation | ||
} | ||
|
||
func NewTestingSuite( | ||
ctx context.Context, | ||
testInst *e2e.TestInstallation, | ||
) suite.TestingSuite { | ||
return &testingSuite{ | ||
ctx: ctx, | ||
ti: testInst, | ||
} | ||
} | ||
|
||
func (s *testingSuite) SetupSuite() { | ||
err := s.ti.Actions.Kubectl().ApplyFile(s.ctx, emptyVsManifest) | ||
s.NoError(err, "can apply manifest "+emptyVsManifest) | ||
} | ||
|
||
func (s *testingSuite) TearDownSuite() { | ||
output, err := s.ti.Actions.Kubectl().DeleteFileWithOutput(s.ctx, emptyVsManifest) | ||
s.ti.Assertions.ExpectObjectDeleted(emptyVsManifest, err, output) | ||
} | ||
|
||
// See TestApplyCRDs() helm test for a future-proofed common category test, | ||
// which ensures all CRDs in our helm chart include the gloo-gateway category. | ||
// This test uses one of those CRs to assert that the resulting end user experience is as desired. | ||
func (s *testingSuite) TestCommonCategory() { | ||
cmd := s.ti.Actions.Kubectl().Command(s.ctx, "get", helm.CommonCRDCategory, "-o", "name") | ||
|
||
var out bytes.Buffer | ||
err := cmd.WithStdout(io.Writer(&out)).Run().Cause() | ||
s.NoError(err) | ||
|
||
// output should match the installed VS | ||
s.Equal(strings.TrimSpace(out.String()), installedVs) | ||
} |
5 changes: 5 additions & 0 deletions
5
test/kubernetes/e2e/features/crd_categories/testdata/manifests/empty-virtualservice.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,5 @@ | ||
apiVersion: gateway.solo.io/v1 | ||
kind: VirtualService | ||
metadata: | ||
name: empty-virtualservice | ||
spec: {} |
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,13 @@ | ||
package crd_categories | ||
|
||
import ( | ||
"path/filepath" | ||
|
||
"github.com/solo-io/skv2/codegen/util" | ||
) | ||
|
||
var ( | ||
emptyVsManifest = filepath.Join(util.MustGetThisDir(), "testdata/manifests", "empty-virtualservice.yaml") | ||
|
||
installedVs = "virtualservice.gateway.solo.io/empty-virtualservice" | ||
) |
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
Oops, something went wrong.