Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: channels use consumergroups #3816

Merged
merged 29 commits into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
5c77fd8
feat: channels use consumergroups
Cali0707 Apr 4, 2024
f39e4fb
fix: upgrade tests hopefully work now during downgrades
Cali0707 Apr 4, 2024
8ca6796
fix: e2e-common.sh should deploy statefulsets properly
Cali0707 Apr 4, 2024
2479f0e
fix: KafkaChannel lease name in test
Cali0707 Apr 5, 2024
fc13ff4
track channel secret
Cali0707 Apr 5, 2024
ec95a51
fix: channel sets reply on consumergroup
Cali0707 Apr 5, 2024
2c6f437
correctly handle delivery and reply specs in channelv2
Cali0707 Apr 5, 2024
04f1eeb
fix: channel sets sa name for cg
Cali0707 Apr 5, 2024
2136a38
fix: set subscriber certs and audience
Cali0707 Apr 5, 2024
519741e
fix: channelv2 has tls fixes from channelv1
Cali0707 Apr 11, 2024
76f795c
feat: added trustbundles to channelv2
Cali0707 Apr 12, 2024
8419e75
fix: channelv2 sets volumeGeneration annotation on receiver pods
Cali0707 Apr 12, 2024
622e605
fix: unit tests pass again
Cali0707 Apr 12, 2024
4f36859
fix: downgrade uses correct kind when deleting cgs
Cali0707 Apr 12, 2024
28dd200
fixed merge conflicts
Cali0707 Apr 30, 2024
a44ab90
fixed merge conflicts
Cali0707 May 7, 2024
a59a964
fix: post install job should work without crashing now
Cali0707 May 7, 2024
60274ad
fix: remap lease instead of renaming
Cali0707 May 7, 2024
24e71c7
remove unused import
Cali0707 May 7, 2024
656cd10
statefulset - statefulsets
Cali0707 May 7, 2024
e2a35d5
fix: revert channel receiver to a deployment instead of sts
Cali0707 May 14, 2024
3a56ec3
cleanup: removed channel v1
Cali0707 May 14, 2024
a6589ef
Merge branch 'main' into use-channelv2
Cali0707 May 16, 2024
b4f283e
fix build issues and lint issues
Cali0707 May 16, 2024
6839402
fix: channelv2 -> channel
Cali0707 May 28, 2024
ebed6d5
Apply suggestions from code review
Cali0707 May 30, 2024
1c21e04
cleanup: renamed kafka_broker_deployment_deleter to kafka_channel_dep…
Cali0707 May 30, 2024
74f14a7
fix merge conflicts
Cali0707 May 31, 2024
29e5234
fix build issue
Cali0707 Jun 3, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
43 changes: 43 additions & 0 deletions control-plane/cmd/post-install/kafka_channel_deployment_deleter.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* Copyright 2024 The Knative Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package main

import (
"context"
"fmt"

"k8s.io/apimachinery/pkg/types"
"k8s.io/client-go/kubernetes"
)

type kafkaDeploymentDeleter struct {
k8s kubernetes.Interface
}

func (k *kafkaDeploymentDeleter) DeleteChannelDeployments(ctx context.Context) error {
deployments := []string{
"kafka-channel-dispatcher",
}

for _, deployment := range deployments {
if err := k.deleteDeployment(ctx, types.NamespacedName{Name: deployment, Namespace: "knative-eventing"}); err != nil {
return fmt.Errorf("failed to delete deployment %s: %v", deployment, err)
}
}

return nil
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,8 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/util/wait"
"k8s.io/client-go/kubernetes"
)

type kafkaDeploymentDeleter struct {
k8s kubernetes.Interface
}

func (k *kafkaDeploymentDeleter) DeleteBrokerDeployments(ctx context.Context) error {
deployments := make([]types.NamespacedName, 0)
c := ""
Expand Down
4 changes: 4 additions & 0 deletions control-plane/cmd/post-install/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ func run(ctx context.Context) error {
k8s: kubernetes.NewForConfigOrDie(config),
}

if err := deploymentDeleter.DeleteChannelDeployments(ctx); err != nil {
return fmt.Errorf("channel migration failed: %v", err)
}

if err := deploymentDeleter.DeleteBrokerDeployments(ctx); err != nil {
return fmt.Errorf("broker migration failed: %v", err)
}
Expand Down