-
Notifications
You must be signed in to change notification settings - Fork 345
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: check if stream_routes is disabled (#868)
- Loading branch information
1 parent
90dd10e
commit e0518a4
Showing
5 changed files
with
176 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
// Licensed to the Apache Software Foundation (ASF) under one | ||
// or more contributor license agreements. See the NOTICE file | ||
// distributed with this work for additional information | ||
// regarding copyright ownership. The ASF licenses this file | ||
// to you 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 apisix | ||
|
||
import ( | ||
"context" | ||
|
||
v1 "github.com/apache/apisix-ingress-controller/pkg/types/apisix/v1" | ||
) | ||
|
||
var ( | ||
_ StreamRoute = (*noopClient)(nil) | ||
) | ||
|
||
type noopClient struct { | ||
} | ||
|
||
func (r *noopClient) Get(ctx context.Context, name string) (*v1.StreamRoute, error) { | ||
return nil, nil | ||
} | ||
|
||
func (r *noopClient) List(ctx context.Context) ([]*v1.StreamRoute, error) { | ||
return nil, nil | ||
} | ||
|
||
func (r *noopClient) Create(ctx context.Context, obj *v1.StreamRoute) (*v1.StreamRoute, error) { | ||
return nil, nil | ||
} | ||
|
||
func (r *noopClient) Delete(ctx context.Context, obj *v1.StreamRoute) error { | ||
return nil | ||
} | ||
|
||
func (r *noopClient) Update(ctx context.Context, obj *v1.StreamRoute) (*v1.StreamRoute, error) { | ||
return nil, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# | ||
# Licensed to the Apache Software Foundation (ASF) under one or more | ||
# contributor license agreements. See the NOTICE file distributed with | ||
# this work for additional information regarding copyright ownership. | ||
# The ASF licenses this file to You 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. | ||
# | ||
# PLEASE DO NOT UPDATE THIS FILE! | ||
# If you want to set the specified configuration value, you can set the new | ||
# value in the conf/config.yaml file. | ||
# | ||
|
||
apisix: | ||
enable_control: true | ||
enable_reuseport: true # Enable nginx SO_REUSEPORT switch if set to true. | ||
allow_admin: | ||
- 127.0.0.0/24 | ||
- 0.0.0.0/0 | ||
port_admin: 9180 | ||
# stream_proxy: # TCP/UDP proxy | ||
# only: false | ||
# tcp: # TCP proxy port list | ||
# - 9100 | ||
# udp: | ||
# - 9200 | ||
etcd: | ||
host: # it's possible to define multiple etcd hosts addresses of the same etcd cluster. | ||
- "http://{{ .EtcdServiceFQDN }}:2379" # multiple etcd address | ||
prefix: "/apisix" # apisix configurations prefix | ||
timeout: 30 # 30 seconds | ||
plugin_attr: | ||
prometheus: | ||
enable_export_server: false |