mirror of
https://github.com/aquasecurity/kube-bench.git
synced 2025-06-15 12:38:49 +00:00
removes federated (#431)
This commit is contained in:
parent
91dfeb7577
commit
c22f81610d
@ -5,7 +5,6 @@
|
|||||||
## Uncomment to use different control file paths.
|
## Uncomment to use different control file paths.
|
||||||
# masterControls: ./cfg/master.yaml
|
# masterControls: ./cfg/master.yaml
|
||||||
# nodeControls: ./cfg/node.yaml
|
# nodeControls: ./cfg/node.yaml
|
||||||
# federatedControls: ./cfg/federated.yaml
|
|
||||||
|
|
||||||
master:
|
master:
|
||||||
components:
|
components:
|
||||||
@ -131,21 +130,4 @@ node:
|
|||||||
svc:
|
svc:
|
||||||
- "/lib/systemd/system/kube-proxy.service"
|
- "/lib/systemd/system/kube-proxy.service"
|
||||||
defaultconf: /etc/kubernetes/addons/kube-proxy-daemonset.yaml
|
defaultconf: /etc/kubernetes/addons/kube-proxy-daemonset.yaml
|
||||||
defaultkubeconfig: "/etc/kubernetes/proxy.conf"
|
defaultkubeconfig: "/etc/kubernetes/proxy.conf"
|
||||||
|
|
||||||
federated:
|
|
||||||
components:
|
|
||||||
- fedapiserver
|
|
||||||
- fedcontrollermanager
|
|
||||||
|
|
||||||
fedapiserver:
|
|
||||||
bins:
|
|
||||||
- "hyperkube federation-apiserver"
|
|
||||||
- "kube-federation-apiserver"
|
|
||||||
- "federation-apiserver"
|
|
||||||
|
|
||||||
fedcontrollermanager:
|
|
||||||
bins:
|
|
||||||
- "hyperkube federation-controller-manager"
|
|
||||||
- "kube-federation-controller-manager"
|
|
||||||
- "federation-controller-manager"
|
|
@ -26,7 +26,7 @@ import (
|
|||||||
"github.com/golang/glog"
|
"github.com/golang/glog"
|
||||||
)
|
)
|
||||||
|
|
||||||
// NodeType indicates the type of node (master, node, federated).
|
// NodeType indicates the type of node (master, node).
|
||||||
type NodeType string
|
type NodeType string
|
||||||
|
|
||||||
// State is the state of a control check.
|
// State is the state of a control check.
|
||||||
@ -46,8 +46,6 @@ const (
|
|||||||
MASTER NodeType = "master"
|
MASTER NodeType = "master"
|
||||||
// NODE a node
|
// NODE a node
|
||||||
NODE NodeType = "node"
|
NODE NodeType = "node"
|
||||||
// FEDERATED a federated deployment.
|
|
||||||
FEDERATED NodeType = "federated"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func handleError(err error, context string) (errmsg string) {
|
func handleError(err error, context string) (errmsg string) {
|
||||||
|
@ -207,8 +207,6 @@ func loadConfig(nodetype check.NodeType) string {
|
|||||||
file = masterFile
|
file = masterFile
|
||||||
case check.NODE:
|
case check.NODE:
|
||||||
file = nodeFile
|
file = nodeFile
|
||||||
case check.FEDERATED:
|
|
||||||
file = federatedFile
|
|
||||||
}
|
}
|
||||||
|
|
||||||
runningVersion := ""
|
runningVersion := ""
|
||||||
|
@ -1,41 +0,0 @@
|
|||||||
// Copyright © 2017 Aqua Security Software Ltd. <info@aquasec.com>
|
|
||||||
//
|
|
||||||
// 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 cmd
|
|
||||||
|
|
||||||
import (
|
|
||||||
"github.com/aquasecurity/kube-bench/check"
|
|
||||||
"github.com/spf13/cobra"
|
|
||||||
)
|
|
||||||
|
|
||||||
// nodeCmd represents the node command
|
|
||||||
var federatedCmd = &cobra.Command{
|
|
||||||
Use: "federated",
|
|
||||||
Short: "Run benchmark checks for a Kubernetes federated deployment.",
|
|
||||||
Long: `Run benchmark checks for a Kubernetes federated deployment.`,
|
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
|
||||||
runChecks(check.FEDERATED)
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
func init() {
|
|
||||||
federatedCmd.PersistentFlags().StringVarP(&federatedFile,
|
|
||||||
"file",
|
|
||||||
"f",
|
|
||||||
"/federated.yaml",
|
|
||||||
"Alternative YAML file for federated checks",
|
|
||||||
)
|
|
||||||
|
|
||||||
RootCmd.AddCommand(federatedCmd)
|
|
||||||
}
|
|
@ -42,7 +42,6 @@ var (
|
|||||||
pgSQL bool
|
pgSQL bool
|
||||||
masterFile = "master.yaml"
|
masterFile = "master.yaml"
|
||||||
nodeFile = "node.yaml"
|
nodeFile = "node.yaml"
|
||||||
federatedFile string
|
|
||||||
noResults bool
|
noResults bool
|
||||||
noSummary bool
|
noSummary bool
|
||||||
noRemediations bool
|
noRemediations bool
|
||||||
@ -134,12 +133,12 @@ func initConfig() {
|
|||||||
// Precedence: Command line flags take precedence over environment variables.
|
// Precedence: Command line flags take precedence over environment variables.
|
||||||
viper.SetEnvPrefix(envVarsPrefix)
|
viper.SetEnvPrefix(envVarsPrefix)
|
||||||
viper.AutomaticEnv()
|
viper.AutomaticEnv()
|
||||||
|
|
||||||
if kubeVersion == "" {
|
if kubeVersion == "" {
|
||||||
if env := viper.Get("version"); env != nil {
|
if env := viper.Get("version"); env != nil {
|
||||||
kubeVersion = env.(string)
|
kubeVersion = env.(string)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// If a config file is found, read it in.
|
// If a config file is found, read it in.
|
||||||
if err := viper.ReadInConfig(); err != nil {
|
if err := viper.ReadInConfig(); err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user