Skip to content

Commit

Permalink
rename config to server to remove stutter
Browse files Browse the repository at this point in the history
  • Loading branch information
stlaz committed Dec 12, 2022
1 parent 63ee22d commit da4ea5b
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions cmd/kube-rbac-proxy/app/kube-rbac-proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ import (
"github.com/brancz/kube-rbac-proxy/cmd/kube-rbac-proxy/app/options"
"github.com/brancz/kube-rbac-proxy/pkg/authn"
"github.com/brancz/kube-rbac-proxy/pkg/authz"
"github.com/brancz/kube-rbac-proxy/pkg/config"
"github.com/brancz/kube-rbac-proxy/pkg/filters"
"github.com/brancz/kube-rbac-proxy/pkg/server"
)

func NewKubeRBACProxyCommand() *cobra.Command {
Expand Down Expand Up @@ -323,8 +323,8 @@ func Run(opts *completedProxyRunOptions) error {
return nil
}

func createKubeRBACProxyConfig(opts *completedProxyRunOptions) (*config.KubeRBACProxyConfig, error) {
proxyConfig := config.NewConfig()
func createKubeRBACProxyConfig(opts *completedProxyRunOptions) (*server.KubeRBACProxyConfig, error) {
proxyConfig := server.NewConfig()
if err := opts.SecureServing.ApplyTo(&proxyConfig.SecureServing); err != nil {
return nil, err
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/kube-rbac-proxy/app/options/legacyoptions.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"strconv"
"time"

"github.com/brancz/kube-rbac-proxy/pkg/config"
"github.com/brancz/kube-rbac-proxy/pkg/server"
"github.com/spf13/pflag"

genericoptions "k8s.io/apiserver/pkg/server/options"
Expand Down Expand Up @@ -95,7 +95,7 @@ func (o *LegacyOptions) ConvertIntoSecureServingOptions(so *genericoptions.Secur
return nil
}

func (o *LegacyOptions) ApplyTo(c *config.KubeRBACProxyInfo) error {
func (o *LegacyOptions) ApplyTo(c *server.KubeRBACProxyInfo) error {
c.InsecureListenAddress = o.InsecureListenAddress
return nil
}
4 changes: 2 additions & 2 deletions cmd/kube-rbac-proxy/app/options/proxyoptions.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (

"github.com/brancz/kube-rbac-proxy/pkg/authn"
"github.com/brancz/kube-rbac-proxy/pkg/authz"
"github.com/brancz/kube-rbac-proxy/pkg/config"
"github.com/brancz/kube-rbac-proxy/pkg/server"
)

type ProxyOptions struct {
Expand Down Expand Up @@ -115,7 +115,7 @@ func (o *ProxyOptions) Validate() []error {
return errs
}

func (o *ProxyOptions) ApplyTo(c *config.KubeRBACProxyInfo) error {
func (o *ProxyOptions) ApplyTo(c *server.KubeRBACProxyInfo) error {
var err error

c.UpstreamURL, err = url.Parse(o.Upstream)
Expand Down
2 changes: 1 addition & 1 deletion pkg/config/config.go → pkg/server/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package config
package server

import (
"crypto/tls"
Expand Down
2 changes: 1 addition & 1 deletion pkg/config/config_test.go → pkg/server/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +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 config
package server

import (
"crypto/rand"
Expand Down

0 comments on commit da4ea5b

Please sign in to comment.