Skip to content

Commit

Permalink
chore: remove (deprecate) all manifests from deploy/single
Browse files Browse the repository at this point in the history
  • Loading branch information
programmer04 committed Oct 25, 2023
1 parent cac9630 commit 58cd6e8
Show file tree
Hide file tree
Showing 19 changed files with 13,884 additions and 13,747 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
**/zz_generated*.go linguist-generated=true
pkg/clientset/** linguist-generated=true
deploy/single/** linguist-generated=true
test/e2e/manifests/** linguist-generated=true
docs/api-reference.md linguist-generated=true
internal/dataplane/parser/testdata/golden/**/*_golden.yaml linguist-generated=true
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ Adding a new version? You'll need three changes:
It's nearly identical to `deploy/single/all-in-one-dbless-k4k8s-enterprise.yaml`
which is used in the official docs.
[#4873](https://github.com/Kong/kubernetes-ingress-controller/pull/4873)
- All manifests from `deploy/single` are no longer supported as installation
method and were removed, please use Helm chart or Kong Gateway Operator instead.
[]()
- Credentials now use a `konghq.com/credential` label to indicate
credential type instead of the `kongCredType` field. This allows controller
compontents to avoid caching unnecessary Secrets. The `kongCredType` field is
Expand Down
12 changes: 4 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,11 @@ a hosted Kubernetes service like [GKE](https://cloud.google.com/kubernetes-engin
Setting up Kong for Kubernetes is as simple as:

```shell
# using YAMLs
$ kubectl apply -f https://raw.githubusercontent.com/Kong/kubernetes-ingress-controller/latest/deploy/single/all-in-one-dbless.yaml
# Using Helm
helm repo add kong https://charts.konghq.com
helm repo update

# or using Helm
$ helm repo add kong https://charts.konghq.com
$ helm repo update

# Helm 3
$ helm install kong/kong --generate-name --set ingressController.installCRDs=false
helm install kong/kong --generate-name --set ingressController.installCRDs=false
```

Once installed, please follow the [Getting Started guide][docs-konghq-getting-started-guide]
Expand Down
2,271 changes: 16 additions & 2,255 deletions deploy/single/all-in-one-dbless-k4k8s-enterprise.yaml

Large diffs are not rendered by default.

2,279 changes: 16 additions & 2,263 deletions deploy/single/all-in-one-dbless-konnect-enterprise.yaml

Large diffs are not rendered by default.

2,281 changes: 16 additions & 2,265 deletions deploy/single/all-in-one-dbless-konnect.yaml

Large diffs are not rendered by default.

2,266 changes: 16 additions & 2,250 deletions deploy/single/all-in-one-dbless.yaml

Large diffs are not rendered by default.

2,396 changes: 16 additions & 2,380 deletions deploy/single/all-in-one-postgres-enterprise.yaml

Large diffs are not rendered by default.

2,321 changes: 16 additions & 2,305 deletions deploy/single/all-in-one-postgres.yaml

Large diffs are not rendered by default.

48 changes: 40 additions & 8 deletions scripts/build-single-manifests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
set -o errexit
set -o nounset
set -o pipefail

REPO_ROOT=$(dirname ${BASH_SOURCE})/..

cd "${REPO_ROOT}"
Expand All @@ -15,14 +14,47 @@ cd "${REPO_ROOT}"
function generate_all_in_one_manifest()
{
echo "Generating kustomize manifest for ${1} in ${2}"
echo -e '# Generated by build-single-manifest.sh. DO NOT EDIT.\n' > "${2}"
echo -e '# Generated by build-single-manifest.sh. NOT FOR PRODUCTION USE (only used internally for testing). DO NOT EDIT.\n' > "${2}"
"${REPO_ROOT}/bin/kustomize" build "${1}" >> "${2}"
}

function generate_deprecation_message()
{
echo "Generating manifest with deprecation info in ${1}"
cat << EOF > "${1}"
# Generated by build-single-manifest.sh. DO NOT EDIT.
#
# DEPRECATED
#
# For Kong Ingress Controller 3.0+, please use Helm instead:
#
# $ helm repo add kong https://charts.konghq.com
# $ helm repo update
# $ helm install kong/kong --generate-name --set ingressController.installCRDs=false
#
# If you intend to use an older version, Helm is recommended but you still have the option
# to install using manifests. In that case, replace the 'main' branch in your link with the
# KIC tag. For example:
# kubectl apply -f https://raw.githubusercontent.com/Kong/kubernetes-ingress-controller/v2.12.0/${1}
#
apiVersion: please-use-helm-to-install-kong
kind: Deprecated
EOF
}


MANIFESTS=(
'postgres all-in-one-postgres.yaml'
'enterprise all-in-one-dbless-k4k8s-enterprise.yaml'
'enterprise-postgres all-in-one-postgres-enterprise.yaml'
'multi-gw/oss all-in-one-dbless.yaml'
'konnect/oss all-in-one-dbless-konnect.yaml'
'konnect/enterprise all-in-one-dbless-konnect-enterprise.yaml'
)

generate_all_in_one_manifest 'config/variants/postgres' 'deploy/single/all-in-one-postgres.yaml'
generate_all_in_one_manifest 'config/variants/enterprise' 'deploy/single/all-in-one-dbless-k4k8s-enterprise.yaml'
generate_all_in_one_manifest 'config/variants/enterprise-postgres' 'deploy/single/all-in-one-postgres-enterprise.yaml'
generate_all_in_one_manifest 'config/variants/multi-gw/oss' 'deploy/single/all-in-one-dbless.yaml'
generate_all_in_one_manifest 'config/variants/konnect/oss' 'deploy/single/all-in-one-dbless-konnect.yaml'
generate_all_in_one_manifest 'config/variants/konnect/enterprise' 'deploy/single/all-in-one-dbless-konnect-enterprise.yaml'
for MANIFEST in "${MANIFESTS[@]}"; do
set -- ${MANIFEST} # Unpack tuple-like structure MANIFESTS.
generate_all_in_one_manifest "config/variants/${1}" "test/e2e/manifests/${2}"
generate_deprecation_message "deploy/single/${2}"
done
17 changes: 7 additions & 10 deletions test/e2e/all_in_one_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ import (
// ensure that things are up and running.
// -----------------------------------------------------------------------------

const entDBLESSPath = "../../deploy/single/all-in-one-dbless-k4k8s-enterprise.yaml"

func TestDeployAllInOneEnterpriseDBLESS(t *testing.T) {
t.Log("configuring all-in-one-dbless-k4k8s-enterprise.yaml manifest test")
const entDBLESSPath = "manifests/all-in-one-dbless-k4k8s-enterprise.yaml"

t.Logf("configuring %s manifest test", entDBLESSPath)
if os.Getenv(kong.LicenseDataEnvVar) == "" {
t.Skipf("no license available to test enterprise: %s was not provided", kong.LicenseDataEnvVar)
}
Expand Down Expand Up @@ -73,7 +73,7 @@ func TestDeployAllInOneEnterpriseDBLESS(t *testing.T) {
verifyEnterprise(ctx, t, env, adminPassword)
}

const postgresPath = "../../deploy/single/all-in-one-postgres.yaml"
const postgresPath = "manifests/all-in-one-postgres.yaml"

func TestDeployAllInOnePostgres(t *testing.T) {
t.Log("configuring all-in-one-postgres.yaml manifest test")
Expand Down Expand Up @@ -215,7 +215,7 @@ func TestDeployAllInOnePostgresWithMultipleReplicas(t *testing.T) {
}, 2*time.Minute, time.Second)
}

const entPostgresPath = "../../deploy/single/all-in-one-postgres-enterprise.yaml"
const entPostgresPath = "manifests/all-in-one-postgres-enterprise.yaml"

func TestDeployAllInOneEnterprisePostgres(t *testing.T) {
t.Log("configuring all-in-one-postgres-enterprise.yaml manifest test")
Expand Down Expand Up @@ -259,12 +259,9 @@ func TestDeployAllInOneEnterprisePostgres(t *testing.T) {
func TestDeployAllInOneDBLESS(t *testing.T) {
t.Parallel()

const (
manifestFileName = "all-in-one-dbless.yaml"
manifestFilePath = "../../deploy/single/" + manifestFileName
)
const manifestFilePath = "manifests/all-in-one-dbless.yaml"

t.Logf("configuring %s manifest test", manifestFileName)
t.Logf("configuring %s manifest test", manifestFilePath)
ctx, env := setupE2ETest(t)

t.Log("deploying kong components")
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/konnect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func TestKonnectLicenseActivation(t *testing.T) {
cert, key := createClientCertificate(ctx, t, rgID)
createKonnectClientSecretAndConfigMap(ctx, t, env, cert, key, rgID)

manifestFile := "../../deploy/single/all-in-one-dbless-konnect-enterprise.yaml"
const manifestFile = "manifests/all-in-one-dbless-konnect-enterprise.yaml"
ManifestDeploy{Path: manifestFile}.Run(ctx, t, env)

exposeAdminAPI(ctx, t, env, k8stypes.NamespacedName{Namespace: "kong", Name: "proxy-kong"})
Expand Down Expand Up @@ -167,7 +167,7 @@ func skipIfMissingRequiredKonnectEnvVariables(t *testing.T) {
// deployAllInOneKonnectManifest deploys all-in-one-dbless-konnect.yaml manifest, replacing the controller image
// if specified by environment variables.
func deployAllInOneKonnectManifest(ctx context.Context, t *testing.T, env environment.Environment) Deployments {
const manifestFile = "../../deploy/single/all-in-one-dbless-konnect.yaml"
const manifestFile = "manifests/all-in-one-dbless-konnect.yaml"
t.Logf("deploying %s manifest file", manifestFile)

return ManifestDeploy{Path: manifestFile}.Run(ctx, t, env)
Expand Down
Loading

1 comment on commit 58cd6e8

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Go Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.50.

Benchmark suite Current: 58cd6e8 Previous: 3684658 Ratio
BenchmarkDeckgenGenerateSHA - ns/op 125609 ns/op 67000 ns/op 1.87

This comment was automatically generated by workflow using github-action-benchmark.

CC: @Kong/k8s-maintainers

Please sign in to comment.