Skip to content

Commit

Permalink
upgrade to latest dependencies (#3627)
Browse files Browse the repository at this point in the history
bumping knative.dev/hack e89096d...f3f03ac:
  > f3f03ac [release-1.13] Don't hardcode serving as the repo when setting highest semver (# 362)
bumping knative.dev/eventing 01d8ace...fd95228:
  > fd95228 Enable storage of EventType v1b2 (# 7594)
  > 6962251 Add a Prerequisite helper to check if the OIDC authentication feature flag is enabled (# 7609)
  > 341a8df [main] Update community files (# 7611)
  > bb5313d Remove OIDC service account, when OIDC feature is disabled again (# 7570)
  > 44ff98b Eventing TLS: Add scheme label to metrics (# 7581)
  > 8d6c6e4 Bump Go to v1.21 (# 7602)
  > 7cba45b Add TLS test for sequence (# 7600)

Signed-off-by: Knative Automation <automation@knative.team>
  • Loading branch information
knative-automation authored Jan 24, 2024
1 parent f5c8332 commit e1c06ae
Show file tree
Hide file tree
Showing 8 changed files with 66 additions and 12 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ require (
k8s.io/apiserver v0.28.5
k8s.io/client-go v0.28.5
k8s.io/utils v0.0.0-20230406110748-d93618cff8a2
knative.dev/eventing v0.39.1-0.20240119013412-01d8acead891
knative.dev/hack v0.0.0-20240111013919-e89096d74d85
knative.dev/eventing v0.40.0
knative.dev/hack v0.0.0-20240123162936-f3f03ac0ab1a
knative.dev/pkg v0.0.0-20240116073220-b488e7be5902
knative.dev/reconciler-test v0.0.0-20240116084801-50276dfba7b3
sigs.k8s.io/controller-runtime v0.12.3
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1267,10 +1267,10 @@ k8s.io/utils v0.0.0-20200912215256-4140de9c8800/go.mod h1:jPW/WVKK9YHAvNhRxK0md/
k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk=
k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
knative.dev/eventing v0.39.1-0.20240119013412-01d8acead891 h1:jVbxj/8FFdC0SbRLbznJjTFVtKt+DJjBSR3kgoYH4eE=
knative.dev/eventing v0.39.1-0.20240119013412-01d8acead891/go.mod h1:sdLjctz8g4pQJwyliGRv+7NrBDPV4O7cm4QyHVOLsUA=
knative.dev/hack v0.0.0-20240111013919-e89096d74d85 h1:ERgPObDcW9LfaEPAeFvbW3UJcF3C3ul6B2ErNMv13OE=
knative.dev/hack v0.0.0-20240111013919-e89096d74d85/go.mod h1:yk2OjGDsbEnQjfxdm0/HJKS2WqTLEFg/N6nUs6Rqx3Q=
knative.dev/eventing v0.40.0 h1:zvMeKGBdQ5Us94Hdy7jmxpzyc1fdFnO4SS21+6nDSiU=
knative.dev/eventing v0.40.0/go.mod h1:+yUUIyvX9fn9bCSH3012kc8rG7YBbjvvxwy1Kr53dRc=
knative.dev/hack v0.0.0-20240123162936-f3f03ac0ab1a h1:+4Mdk0Lt3LGAVEI6vYyhfjBlVBx7sqS4wECtTkuXoSY=
knative.dev/hack v0.0.0-20240123162936-f3f03ac0ab1a/go.mod h1:yk2OjGDsbEnQjfxdm0/HJKS2WqTLEFg/N6nUs6Rqx3Q=
knative.dev/pkg v0.0.0-20240116073220-b488e7be5902 h1:H6+JJN23fhwYWCHY1339sY6uhIyoUwDy1a8dN233fdk=
knative.dev/pkg v0.0.0-20240116073220-b488e7be5902/go.mod h1:NYk8mMYoLkO7CQWnNkti4YGGnvLxN6MIDbUvtgeo0C0=
knative.dev/reconciler-test v0.0.0-20240116084801-50276dfba7b3 h1:YgmYC7C3CH1urEryPvgS1PmVi6PZG2fXqGWDQ0snib4=
Expand Down
23 changes: 23 additions & 0 deletions vendor/knative.dev/eventing/pkg/auth/serviceaccount.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,26 @@ func EnsureOIDCServiceAccountExistsForResource(ctx context.Context, serviceAccou
return nil
}

// DeleteOIDCServiceAccountIfExists makes sure the given resource does not have an OIDC service account.
// If it does that service account is deleted.
func DeleteOIDCServiceAccountIfExists(ctx context.Context, serviceAccountLister corev1listers.ServiceAccountLister, kubeclient kubernetes.Interface, gvk schema.GroupVersionKind, objectMeta metav1.ObjectMeta) error {
saName := GetOIDCServiceAccountNameForResource(gvk, objectMeta)
sa, err := serviceAccountLister.ServiceAccounts(objectMeta.Namespace).Get(saName)

if err == nil && metav1.IsControlledBy(&sa.ObjectMeta, &objectMeta) {
logging.FromContext(ctx).Debugf("OIDC Service account exists and has correct owner (%s/%s). Deleting OIDC service account", objectMeta.Name, objectMeta.Namespace)

err = kubeclient.CoreV1().ServiceAccounts(objectMeta.Namespace).Delete(ctx, sa.Name, metav1.DeleteOptions{})
if err != nil {
return fmt.Errorf("could not delete OIDC service account %s/%s for %s: %w", objectMeta.Name, objectMeta.Namespace, gvk.Kind, err)
}
} else if apierrs.IsNotFound(err) {
return nil
}

return err
}

type OIDCIdentityStatusMarker interface {
MarkOIDCIdentityCreatedSucceeded()
MarkOIDCIdentityCreatedSucceededWithReason(reason, messageFormat string, messageA ...interface{})
Expand All @@ -119,6 +139,9 @@ func SetupOIDCServiceAccount(ctx context.Context, flags feature.Flags, serviceAc
}
marker.MarkOIDCIdentityCreatedSucceeded()
} else {
if err := DeleteOIDCServiceAccountIfExists(ctx, serviceAccountLister, kubeclient, gvk, objectMeta); err != nil {
return err
}
setAuthStatus(nil)
marker.MarkOIDCIdentityCreatedSucceededWithReason(fmt.Sprintf("%s feature disabled", feature.OIDCAuthentication), "")
}
Expand Down
3 changes: 3 additions & 0 deletions vendor/knative.dev/eventing/pkg/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ const (
// LabelEventType is the label for the name of the event type.
LabelEventType = "event_type"

// LabelEventType is the label for the name of the event type.
LabelEventScheme = "event_scheme"

// LabelEventSource is the label for the name of the event source.
LabelEventSource = "event_source"

Expand Down
16 changes: 15 additions & 1 deletion vendor/knative.dev/eventing/test/e2e-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ function install_mt_broker() {
if [[ -z "${EVENTING_MT_CHANNEL_BROKER_YAML:-}" ]]; then
build_knative_from_source
else
echo "use exist EVENTING_MT_CHANNEL_BROKER_YAML"
echo "use existing EVENTING_MT_CHANNEL_BROKER_YAML"
fi
local EVENTING_MT_CHANNEL_BROKER_NAME=${TMP_DIR}/${EVENTING_MT_CHANNEL_BROKER_YAML##*/}
sed "s/namespace: ${KNATIVE_DEFAULT_NAMESPACE}/namespace: ${SYSTEM_NAMESPACE}/g" "${EVENTING_MT_CHANNEL_BROKER_YAML}" > "${EVENTING_MT_CHANNEL_BROKER_NAME}"
Expand All @@ -233,6 +233,20 @@ function install_mt_broker() {
wait_until_pods_running "${SYSTEM_NAMESPACE}" || fail_test "Knative Eventing with MT Broker did not come up"
}

function install_post_install_job() {
# Var defined and populated by generate-yaml.sh
if [[ -z "${EVENTING_POST_INSTALL_YAML:-}" ]]; then
build_knative_from_source
else
echo "use existing EVENTING_POST_INSTALL_YAML"
fi
local EVENTING_POST_INSTALL_NAME=${TMP_DIR}/${EVENTING_POST_INSTALL_YAML##*/}
sed "s/namespace: ${KNATIVE_DEFAULT_NAMESPACE}/namespace: ${SYSTEM_NAMESPACE}/g" "${EVENTING_POST_INSTALL_YAML}" > "${EVENTING_POST_INSTALL_NAME=}"
kubectl create \
-f "${EVENTING_POST_INSTALL_NAME}" || return 1
UNINSTALL_LIST+=( "${EVENTING_POST_INSTALL_NAME}" )
}

function enable_sugar() {
# Extra parameters for ko apply
KO_FLAGS="${KO_FLAGS:-}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,20 @@ func TransportEncryptionStrict() feature.ShouldRun {
}
}

func AuthenticationOIDCEnabled() feature.ShouldRun {
return func(ctx context.Context, t feature.T) (feature.PrerequisiteResult, error) {
flags, err := getFeatureFlags(ctx, "config-features")
if err != nil {
return feature.PrerequisiteResult{}, err
}

return feature.PrerequisiteResult{
ShouldRun: flags.IsOIDCAuthentication(),
Reason: flags.String(),
}, nil
}
}

func IstioDisabled() feature.ShouldRun {
return func(ctx context.Context, t feature.T) (feature.PrerequisiteResult, error) {
flags, err := getFeatureFlags(ctx, "config-features")
Expand Down
4 changes: 2 additions & 2 deletions vendor/knative.dev/hack/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -675,8 +675,8 @@ function set_latest_to_highest_semver() {
abort "cannot get relase id from github"
fi

hub_tool api --method PATCH "/repos/knative/serving/releases/$release_id" \
-F make_latest=true > /dev/null || abort "error settomg $last_version to 'latest'"
hub_tool api --method PATCH "/repos/${ORG_NAME}/${REPO_NAME}/releases/$release_id" \
-F make_latest=true > /dev/null || abort "error setting $last_version to 'latest'"
echo "Github release ${last_version} set as 'latest'"
}

Expand Down
6 changes: 3 additions & 3 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1326,8 +1326,8 @@ k8s.io/utils/net
k8s.io/utils/pointer
k8s.io/utils/strings/slices
k8s.io/utils/trace
# knative.dev/eventing v0.39.1-0.20240119013412-01d8acead891
## explicit; go 1.19
# knative.dev/eventing v0.40.0
## explicit; go 1.21
knative.dev/eventing/cmd/event_display
knative.dev/eventing/cmd/heartbeats
knative.dev/eventing/hack
Expand Down Expand Up @@ -1493,7 +1493,7 @@ knative.dev/eventing/test/upgrade/prober/wathola/fetcher
knative.dev/eventing/test/upgrade/prober/wathola/forwarder
knative.dev/eventing/test/upgrade/prober/wathola/receiver
knative.dev/eventing/test/upgrade/prober/wathola/sender
# knative.dev/hack v0.0.0-20240111013919-e89096d74d85
# knative.dev/hack v0.0.0-20240123162936-f3f03ac0ab1a
## explicit; go 1.18
knative.dev/hack
# knative.dev/pkg v0.0.0-20240116073220-b488e7be5902
Expand Down

0 comments on commit e1c06ae

Please sign in to comment.