diff --git a/README.md b/README.md index 6d50dcd..b83ab0f 100644 --- a/README.md +++ b/README.md @@ -200,7 +200,7 @@ spec: | Service Object | Type | Required | Description | |----------------|:----:|:--------:| :-----------: | -| `service` | string | yes | The name of Kubernetes service in the Policy namespace that you want to protect. | +| `serviceName` | string | yes | The name of Kubernetes service in the Policy namespace that you want to protect. | | `paths` | array[Path Object] | yes | A list of path objects that define the endpoints that you want to protect. If left empty, all paths are protected. | diff --git a/adapter/policy/handler/crdeventhandler/add_event.go b/adapter/policy/handler/crdeventhandler/add_event.go index 9930626..4498719 100644 --- a/adapter/policy/handler/crdeventhandler/add_event.go +++ b/adapter/policy/handler/crdeventhandler/add_event.go @@ -33,10 +33,10 @@ type PolicyAddEventHandler struct { } func (e *JwtConfigAddEventHandler) HandleAddUpdateEvent() { - zap.L().Info("Create/Update JwtPolicy", zap.String("ID", string(e.Obj.ObjectMeta.UID)), zap.String("name", e.Obj.Name), zap.String("namespace", e.Obj.Namespace)) + zap.L().Info("Create/Update JwtConfig", zap.String("ID", string(e.Obj.ObjectMeta.UID)), zap.String("name", e.Obj.Name), zap.String("namespace", e.Obj.Namespace)) e.Obj.Spec.ClientName = e.Obj.ObjectMeta.Namespace + "/" + e.Obj.ObjectMeta.Name e.Store.AddKeySet(e.Obj.Spec.ClientName, keyset.New(e.Obj.Spec.JwksURL, nil)) - zap.L().Info("JwtPolicy created/updated", zap.String("ID", string(e.Obj.ObjectMeta.UID)), zap.String("name", e.Obj.ObjectMeta.Name), zap.String("namespace", e.Obj.ObjectMeta.Namespace)) + zap.L().Info("JwtConfig created/updated", zap.String("ID", string(e.Obj.ObjectMeta.UID)), zap.String("name", e.Obj.ObjectMeta.Name), zap.String("namespace", e.Obj.ObjectMeta.Namespace)) } func (e *OidcConfigAddEventHandler) HandleAddUpdateEvent() { diff --git a/adapter/policy/handler/handler_test.go b/adapter/policy/handler/handler_test.go index 9c15bbf..9f079aa 100644 --- a/adapter/policy/handler/handler_test.go +++ b/adapter/policy/handler/handler_test.go @@ -22,7 +22,7 @@ func getObjectMeta() metav1.ObjectMeta { } func getTypeMeta() metav1.TypeMeta { - return metav1.TypeMeta{APIVersion: "v1", Kind: "JwtPolicy"} + return metav1.TypeMeta{APIVersion: "v1", Kind: "OidcConfig"} }