Skip to content

Commit

Permalink
reorg files (#380)
Browse files Browse the repository at this point in the history
  • Loading branch information
lionelvillard authored Sep 29, 2022
1 parent 43c0f77 commit e1adff0
Show file tree
Hide file tree
Showing 160 changed files with 205 additions and 195 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package main
import (
"knative.dev/pkg/injection/sharedmain"

"knative.dev/eventing-redis/sink/pkg/reconciler/streamsink"
"knative.dev/eventing-redis/pkg/sink/reconciler/streamsink"
)

func main() {
Expand Down
3 changes: 2 additions & 1 deletion sink/cmd/receiver/main.go → cmd/sink/receiver/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@ package main
import (
"log"

"knative.dev/eventing-redis/sink/pkg/receiver"
adapter "knative.dev/eventing/pkg/adapter/v2"
"knative.dev/pkg/signals"

"knative.dev/eventing-redis/pkg/sink/receiver"

cloudevents "github.com/cloudevents/sdk-go/v2"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package main
import (
"knative.dev/pkg/injection/sharedmain"

"knative.dev/eventing-redis/source/pkg/reconciler/streamsource"
"knative.dev/eventing-redis/pkg/source/reconciler/streamsource"
)

func main() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package main
import (
"knative.dev/eventing/pkg/adapter/v2"

kadapter "knative.dev/eventing-redis/source/pkg/adapter"
kadapter "knative.dev/eventing-redis/pkg/source/adapter"
)

func main() {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spec:
spec:
serviceAccountName: redis-controller-manager
containers:
- image: ko://knative.dev/eventing-redis/sink/cmd/controller
- image: ko://knative.dev/eventing-redis/cmd/sink/controller
name: manager
env:
- name: SYSTEM_NAMESPACE
Expand All @@ -47,7 +47,7 @@ spec:
- name: CONFIG_LEADERELECTION_NAME
value: config-leader-election-redis
- name: STREAMSINK_RA_IMAGE
value: ko://knative.dev/eventing-redis/sink/cmd/receiver
value: ko://knative.dev/eventing-redis/cmd/sink/receiver
- name: SECRET_TLS_TLSCERTIFICATE
value: tls-secret
terminationGracePeriodSeconds: 10
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ limitations under the License.

// Package config is a placeholder that allows us to pull in config files
// via go mod vendor.
package config
package sink
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spec:
spec:
serviceAccountName: redis-controller-manager
containers:
- image: ko://knative.dev/eventing-redis/source/cmd/controller
- image: ko://knative.dev/eventing-redis/cmd/source/controller
name: manager
env:
- name: SYSTEM_NAMESPACE
Expand All @@ -47,7 +47,7 @@ spec:
- name: CONFIG_LEADERELECTION_NAME
value: config-leader-election-redis
- name: STREAMSOURCE_RA_IMAGE
value: ko://knative.dev/eventing-redis/source/cmd/receive_adapter
value: ko://knative.dev/eventing-redis/cmd/source/receive_adapter
- name: CONFIG_REDIS_NUMCONSUMERS
value: config-redis
- name: SECRET_TLS_TLSCERTIFICATE
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ limitations under the License.

// Package config is a placeholder that allows us to pull in config files
// via go mod vendor.
package config
package source
File renamed without changes.
6 changes: 3 additions & 3 deletions hack/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ export GO111MODULE=on
# Yaml files to generate, and the source config dir for them.
declare -A COMPONENTS
COMPONENTS=(
["redis-source.yaml"]="source/config"
["redis-sink.yaml"]="sink/config"
["redis-source.yaml"]="config/source"
["redis-sink.yaml"]="config/sink"
)
readonly COMPONENTS

Expand All @@ -42,7 +42,7 @@ function build_release() {
local all_yamls=()
for yaml in "${!COMPONENTS[@]}"; do
local config="${COMPONENTS[${yaml}]}"
echo "Building Knative Eventing Contrib - ${config}"
echo "Building Knative Eventing Redis - ${config}"
# TODO(chizhg): reenable --strict mode after https://github.com/knative/test-infra/issues/1262 is fixed.
ko resolve ${KO_FLAGS} -f ${config}/ | "${LABEL_YAML_CMD[@]}" > ${yaml}
all_yamls+=(${yaml})
Expand Down
8 changes: 4 additions & 4 deletions hack/update-codegen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,25 +32,25 @@ group "Kubernetes Codegen"
# k8s.io/kubernetes. The output-base is needed for the generators to output into the vendor dir
# instead of the $GOPATH directly. For normal projects this can be dropped.
${CODEGEN_PKG}/generate-groups.sh "deepcopy,client,informer,lister" \
knative.dev/eventing-redis/source/pkg/client knative.dev/eventing-redis/source/pkg/apis \
knative.dev/eventing-redis/pkg/source/client knative.dev/eventing-redis/pkg/source/apis \
"sources:v1alpha1" \
--go-header-file ${REPO_ROOT_DIR}/hack/boilerplate.go.txt

${CODEGEN_PKG}/generate-groups.sh "deepcopy,client,informer,lister" \
knative.dev/eventing-redis/sink/pkg/client knative.dev/eventing-redis/sink/pkg/apis \
knative.dev/eventing-redis/pkg/sink/client knative.dev/eventing-redis/pkg/sink/apis \
"sinks:v1alpha1" \
--go-header-file ${REPO_ROOT_DIR}/hack/boilerplate.go.txt

group "Knative Codegen"

# Knative Injection
${KNATIVE_CODEGEN_PKG}/hack/generate-knative.sh "injection" \
knative.dev/eventing-redis/source/pkg/client knative.dev/eventing-redis/source/pkg/apis \
knative.dev/eventing-redis/pkg/source/client knative.dev/eventing-redis/pkg/source/apis \
"sources:v1alpha1" \
--go-header-file ${REPO_ROOT_DIR}/hack/boilerplate.go.txt

${KNATIVE_CODEGEN_PKG}/hack/generate-knative.sh "injection" \
knative.dev/eventing-redis/sink/pkg/client knative.dev/eventing-redis/sink/pkg/apis \
knative.dev/eventing-redis/pkg/sink/client knative.dev/eventing-redis/pkg/sink/apis \
"sinks:v1alpha1" \
--go-header-file ${REPO_ROOT_DIR}/hack/boilerplate.go.txt

Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/v1alpha1/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ 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
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,
Expand Down
1 change: 1 addition & 0 deletions pkg/reconciler/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ 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 reconciler

import (
Expand Down
1 change: 1 addition & 0 deletions pkg/reconciler/kservice.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ 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 reconciler

import (
Expand Down
1 change: 1 addition & 0 deletions pkg/reconciler/rolebinding.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ 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 reconciler

import (
Expand Down
1 change: 1 addition & 0 deletions pkg/reconciler/serviceaccount.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ 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 reconciler

import (
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"knative.dev/eventing-redis/sink/pkg/apis/sinks"

"knative.dev/eventing-redis/pkg/sink/apis/sinks"
)

// SchemeGroupVersion is group version used to register these objects
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ 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
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,
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e1adff0

Please sign in to comment.