Skip to content

Commit

Permalink
Merge branch 'main' into hydra-dep
Browse files Browse the repository at this point in the history
  • Loading branch information
barchw authored Sep 25, 2023
2 parents 502f8b7 + a8eabb4 commit 3082ee6
Show file tree
Hide file tree
Showing 146 changed files with 216 additions and 9,097 deletions.
6 changes: 0 additions & 6 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
/installation/resources/crds/monitoring @kyma-project/observability
/installation/resources/crds/ory @kyma-project/goat
/installation/resources/crds/serverless @kyma-project/Otters
/installation/resources/crds/telemetry @kyma-project/observability

/resources/api-gateway @kyma-project/goat
/resources/application-connector @kyma-project/Framefrog
Expand All @@ -51,11 +50,9 @@
/resources/istio @kyma-project/goat
/resources/istio-resources @kyma-project/goat
/resources/istio-resources/files/dashboards @kyma-project/observability
/resources/logging @kyma-project/observability
/resources/monitoring @kyma-project/observability
/resources/ory @kyma-project/goat
/resources/serverless @kyma-project/Otters
/resources/telemetry @kyma-project/observability

/resources/btp-manager @kyma-project/gopher

Expand All @@ -69,10 +66,7 @@
/tests/fast-integration/skr-nightly @kyma-project/gopher
/tests/fast-integration/skr-test @kyma-project/gopher
/tests/fast-integration/smctl @kyma-project/gopher
/tests/fast-integration/logging @kyma-project/observability
/tests/fast-integration/monitoring @kyma-project/observability
/tests/fast-integration/telemetry-test @kyma-project/observability
/tests/fast-integration/tracing @kyma-project/observability
/tests/fast-integration/prow @kyma-project/Jellyfish

/tests/function-controller @kyma-project/Otters
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM europe-docker.pkg.dev/kyma-project/prod/external/golang:1.20.6-alpine3.18 as builder
FROM europe-docker.pkg.dev/kyma-project/prod/external/golang:1.21.0-alpine3.18 as builder

ARG DOCK_PKG_DIR=/go/src/github.com/kyma-project/kyma/components/central-application-connectivity-validator
WORKDIR $DOCK_PKG_DIR
Expand Down
2 changes: 1 addition & 1 deletion components/central-application-gateway/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM europe-docker.pkg.dev/kyma-project/prod/external/golang:1.20.6-alpine3.18 as builder
FROM europe-docker.pkg.dev/kyma-project/prod/external/golang:1.21.0-alpine3.18 as builder

ARG DOCK_PKG_DIR=/go/src/github.com/kyma-project/kyma/components/central-application-gateway
WORKDIR $DOCK_PKG_DIR
Expand Down
9 changes: 9 additions & 0 deletions components/central-application-gateway/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ Central Application Gateway has the following parameters:
Central Application Gateway exposes:
- an external API implementing a health endpoint for liveness and readiness probes
- 2 internal APIs implementing a proxy handler accessible via a service of type `ClusterIP`
- an endpoint for changing the log level

Application Gateway also supports redirects for the request flows in which the URL host remains unchanged. For more details, see [Response rewriting](../../docs/05-technical-reference/ac-01-application-gateway-details.md#response-rewriting).

Expand Down Expand Up @@ -118,6 +119,14 @@ Invocation of endpoints with duplicate names results in a `400 Bad Request` fail
- `400 Bad Request` - returned when an Application, service, or entry for the [Compass mode](https://kyma-project.io/#/01-overview/application-connectivity/README) is not specified in the path.
- `504 Gateway Timeout` - returned when a call to the target API times out.

### Debugging

The log level can be changed using `zap.AtomicLevel`.
The endpoint is exposed at `http://central-application-gateway.kyma-system:8081/v1/loglevel`.

https://pkg.go.dev/go.uber.org/zap#AtomicLevel.ServeHTTP


## Development

This section explains the development process.
Expand Down
2 changes: 1 addition & 1 deletion components/compass-runtime-agent/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM europe-docker.pkg.dev/kyma-project/prod/external/golang:1.20.6-alpine3.18 as builder
FROM europe-docker.pkg.dev/kyma-project/prod/external/golang:1.21.0-alpine3.18 as builder

ARG DOCK_PKG_DIR=/compass-runtime-agent
WORKDIR $DOCK_PKG_DIR
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import (
kymalogger "github.com/kyma-project/kyma/common/logging/logger"

eventingv1alpha1 "github.com/kyma-project/kyma/components/eventing-controller/api/v1alpha1"
"github.com/kyma-project/kyma/components/eventing-controller/internal/featureflags"
"github.com/kyma-project/kyma/components/eventing-controller/logger"
"github.com/kyma-project/kyma/components/eventing-controller/pkg/deployment"
"github.com/kyma-project/kyma/components/eventing-controller/pkg/env"
Expand Down Expand Up @@ -78,6 +79,8 @@ var _ = BeforeSuite(func(done Done) {
_, err2 = rand.Read(newCABundle)
Expect(err2).NotTo(HaveOccurred())

featureflags.SetEventingWebhookAuthEnabled(false)

// setup dummy mutating webhook
url := "https://eventing-controller.kyma-system.svc.cluster.local"
sideEffectClassNone := admissionv1.SideEffectClassNone
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package featureflags

//nolint:gochecknoglobals // This is global only inside the package.
var f = &flags{
eventingWebhookAuthEnabled: false,
eventingWebhookAuthEnabled: true,
}

type flags struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ func Test_handleKymaSubModified(t *testing.T) {
givenKymaSub: &eventingv1alpha2.Subscription{
Status: eventingv1alpha2.SubscriptionStatus{
Backend: eventingv1alpha2.Backend{
Ev2hash: int64(-9219276050977208880),
EventMeshLocalHash: int64(-9219276050977208880),
},
},
},
Expand Down
6 changes: 0 additions & 6 deletions components/function-controller/cmd/webhook/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,8 @@ func main() {
whs.CertName = resources.CertFile
whs.KeyName = resources.KeyFile

defaultCfg, err := webhookCfg.ToDefaultingConfig()
if err != nil {
setupLog.Error(err, "while creating of defaulting configuration")
os.Exit(1)
}
whs.Register(resources.FunctionDefaultingWebhookPath, &ctrlwebhook.Admission{
Handler: webhook.NewDefaultingWebhook(
&defaultCfg,
mgr.GetClient(),
logWithCtx.Named("defaulting-webhook")),
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,15 @@ import (
)

type DefaultingWebHook struct {
configAlphaV2 *serverlessv1alpha2.DefaultingConfig
client ctrlclient.Client
decoder *admission.Decoder
log *zap.SugaredLogger
client ctrlclient.Client
decoder *admission.Decoder
log *zap.SugaredLogger
}

func NewDefaultingWebhook(configV1Alpha2 *serverlessv1alpha2.DefaultingConfig, client ctrlclient.Client, log *zap.SugaredLogger) *DefaultingWebHook {
func NewDefaultingWebhook(client ctrlclient.Client, log *zap.SugaredLogger) *DefaultingWebHook {
return &DefaultingWebHook{
configAlphaV2: configV1Alpha2,
client: client,
log: log,
client: client,
log: log,
}
}

Expand All @@ -39,11 +37,6 @@ func (w *DefaultingWebHook) Handle(_ context.Context, req admission.Request) adm
log.Debug("defaulting finished for function")
return res
}
if req.Kind.Kind == "GitRepository" {
res := w.handleGitRepoDefaulting()
log.Debug("defaulting finished for gitrepository")
return res
}

log.Debug("request object invalid kind")
return admission.Errored(http.StatusBadRequest, fmt.Errorf("invalid kind: %v", req.Kind.Kind))
Expand All @@ -63,7 +56,6 @@ func (w *DefaultingWebHook) handleFunctionDefaulting(req admission.Request) admi
if err := w.decoder.Decode(req, fn); err != nil {
return admission.Errored(http.StatusBadRequest, err)
}
fn.Default(w.configAlphaV2)
f = fn
}
default:
Expand All @@ -76,7 +68,3 @@ func (w *DefaultingWebHook) handleFunctionDefaulting(req admission.Request) admi
}
return admission.PatchResponseFromRaw(req.Object.Raw, fBytes)
}

func (w *DefaultingWebHook) handleGitRepoDefaulting() admission.Response {
return admission.Allowed("")
}

This file was deleted.

Loading

0 comments on commit 3082ee6

Please sign in to comment.