Skip to content

Commit

Permalink
Merge pull request #2406 from AmaliMatharaarachchi/gateway-r2
Browse files Browse the repository at this point in the history
Gateway Conformance changes
  • Loading branch information
Tharsanan1 authored Aug 6, 2024
2 parents 92b8337 + 263f632 commit eade7e3
Show file tree
Hide file tree
Showing 984 changed files with 98,342 additions and 674 deletions.
32 changes: 32 additions & 0 deletions adapter/config/default_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,4 +273,36 @@ var defaultConfig = &Config{
"endpoint": "/api/v2/spans",
},
},
Deployment: deployment{
//todo(amali) add validation
Gateway: gateway{
Namespace: "apk",
AdapterHostName: "",
AdapterHost: "",
CommonControllerHostName: "",
CommonControllerHost: "",
EnforcerPrivateKeyPath: "/home/wso2/security/keystore/enforcer.key",
EnforcerPublicCertPath: "/home/wso2/security/keystore/enforcer.crt",
EnforcerServerName: "",
AdapterTrustedCAPath: "/home/wso2/security/truststore",
AdapterXDSPort: "18000",
CommonControllerXDSPort: "18002",
CommonControllerRestPort: "18003",
EnforcerLabel: "wso2-apk-default",
EnforcerRegion: "UNKNOWN",
EnforcerXDSMaxMsgSize: "4194304",
EnforcerXDSMaxRetries: "3",
JavaOpts: "-Dhttpclient.hostnameVerifier=AllowAll -Xms512m -Xmx512m -XX:MaxRAMFraction=2",
Volumes: volumes{
RatelimiterTruststoreSecretVolume: "",
EnforcerKeystoreSecretVolume: "",
RouterKeystoreSecretVolume: "",
AdapterTruststoreSecretVolume: "",
EnforcerJwtSecretVolume: "",
EnforcerTrustedCerts: "",
EnforcerApikeyCert: "",
IDPCertificateSecretVolume: "",
},
},
},
}
38 changes: 37 additions & 1 deletion adapter/config/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ type Config struct {
PartitionServer partitionServer `toml:"partitionServer"`
Analytics analytics `toml:"analytics"`
Tracing tracing
Deployment deployment
}

// Adapter related Configurations
Expand All @@ -101,7 +102,6 @@ type adapter struct {

// Envoy Listener Component related configurations.
type envoy struct {

// ListenerCodecType Default to AUTO where both http1 and http2 connections are handled
// It can be specifically set to either HTTP1 or HTTP2
ListenerCodecType string
Expand Down Expand Up @@ -315,6 +315,42 @@ type tracing struct {
ConfigProperties map[string]string
}

type deployment struct {
Gateway gateway
}

type gateway struct {
Namespace string
AdapterHostName string
AdapterHost string
CommonControllerHostName string
CommonControllerHost string
EnforcerPrivateKeyPath string
EnforcerPublicCertPath string
EnforcerServerName string
AdapterTrustedCAPath string
AdapterXDSPort string
CommonControllerXDSPort string
CommonControllerRestPort string
EnforcerLabel string
EnforcerRegion string
EnforcerXDSMaxMsgSize string
EnforcerXDSMaxRetries string
JavaOpts string
Volumes volumes
}

type volumes struct {
RatelimiterTruststoreSecretVolume string
EnforcerKeystoreSecretVolume string
RouterKeystoreSecretVolume string
AdapterTruststoreSecretVolume string
EnforcerJwtSecretVolume string
EnforcerTrustedCerts string
EnforcerApikeyCert string
IDPCertificateSecretVolume string
}

// Metrics defines the configuration for metrics collection.
type Metrics struct {
Enabled bool
Expand Down
42 changes: 22 additions & 20 deletions adapter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,40 @@ go 1.22

require (
github.com/envoyproxy/go-control-plane v0.12.0
github.com/evanphx/json-patch v5.9.0+incompatible
github.com/fsnotify/fsnotify v1.7.0
github.com/golang/protobuf v1.5.3
github.com/golang/protobuf v1.5.4
github.com/google/go-cmp v0.6.0
github.com/google/uuid v1.6.0
github.com/onsi/ginkgo/v2 v2.14.0
github.com/onsi/gomega v1.30.0
github.com/pelletier/go-toml v1.9.5
github.com/prometheus/client_golang v1.18.0
github.com/sirupsen/logrus v1.9.0
github.com/prometheus/client_golang v1.19.0
github.com/sirupsen/logrus v1.9.3
github.com/telepresenceio/watchable v0.0.0-20220726211108-9bb86f92afa7
github.com/wso2/apk/common-go-libs v0.0.0-20231208100153-24bee7b4bd81
golang.org/x/exp v0.0.0-20231206192017-f3f8817b8deb
google.golang.org/grpc v1.62.0
google.golang.org/grpc v1.62.1
google.golang.org/protobuf v1.33.0
gopkg.in/yaml.v2 v2.4.0
k8s.io/api v0.29.2
k8s.io/apiextensions-apiserver v0.29.2
k8s.io/apimachinery v0.29.2
k8s.io/client-go v0.29.2
k8s.io/utils v0.0.0-20240102154912-e7106e64919e
sigs.k8s.io/controller-runtime v0.17.2
sigs.k8s.io/yaml v1.4.0
)

require (
github.com/agnivade/levenshtein v1.1.1 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/census-instrumentation/opencensus-proto v0.4.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
github.com/envoyproxy/protoc-gen-validate v1.0.4 // indirect
github.com/evanphx/json-patch/v5 v5.8.0 // indirect
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/zapr v1.3.0 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
Expand All @@ -43,23 +48,21 @@ require (
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 // indirect
github.com/imdario/mergo v0.3.16 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
github.com/prometheus/client_model v0.5.0 // indirect
github.com/prometheus/common v0.45.0 // indirect
github.com/prometheus/client_model v0.6.0 // indirect
github.com/prometheus/common v0.50.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/shirou/gopsutil/v3 v3.24.2 // indirect
github.com/shoenig/go-m1cpu v0.1.6 // indirect
Expand All @@ -69,38 +72,37 @@ require (
github.com/vektah/gqlparser v1.3.1 // indirect
github.com/yusufpapurcu/wmi v1.2.4 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.26.0 // indirect
golang.org/x/net v0.21.0 // indirect
golang.org/x/oauth2 v0.16.0 // indirect
golang.org/x/term v0.17.0 // indirect
go.uber.org/zap v1.27.0 // indirect
golang.org/x/net v0.22.0 // indirect
golang.org/x/oauth2 v0.18.0 // indirect
golang.org/x/term v0.18.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.16.1 // indirect
golang.org/x/tools v0.17.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/apiextensions-apiserver v0.29.2 // indirect
k8s.io/component-base v0.29.2 // indirect
k8s.io/klog/v2 v2.120.1 // indirect
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect
k8s.io/utils v0.0.0-20240102154912-e7106e64919e // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
sigs.k8s.io/yaml v1.4.0 // indirect
)

replace github.com/wso2/apk/adapter => ../adapter

replace github.com/wso2/apk/common-go-libs => ../common-go-libs

require (
github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa
github.com/ghodss/yaml v1.0.0
github.com/stretchr/testify v1.8.4
golang.org/x/sys v0.17.0 // indirect
github.com/stretchr/testify v1.9.0
go.opentelemetry.io/proto/otlp v1.1.0
golang.org/x/sys v0.18.0
gopkg.in/natefinch/lumberjack.v2 v2.2.1
sigs.k8s.io/gateway-api v1.0.0
)
Loading

0 comments on commit eade7e3

Please sign in to comment.