mirror of https://github.com/kubernetes/kops.git
Using const() defines constants together (part:1)
update pull request update pull request
This commit is contained in:
parent
77f5935b2a
commit
b4ef490a0f
|
|
@ -30,8 +30,10 @@ import (
|
|||
|
||||
var DefaultChannelBase = "https://raw.githubusercontent.com/kubernetes/kops/master/channels/"
|
||||
|
||||
const DefaultChannel = "stable"
|
||||
const AlphaChannel = "alpha"
|
||||
const (
|
||||
DefaultChannel = "stable"
|
||||
AlphaChannel = "alpha"
|
||||
)
|
||||
|
||||
type Channel struct {
|
||||
v1.TypeMeta `json:",inline"`
|
||||
|
|
|
|||
|
|
@ -16,11 +16,13 @@ limitations under the License.
|
|||
|
||||
package kops
|
||||
|
||||
// AnnotationNameManagement is the annotation that indicates that a cluster is under external or non-standard management
|
||||
const AnnotationNameManagement = "kops.kubernetes.io/management"
|
||||
const (
|
||||
// AnnotationNameManagement is the annotation that indicates that a cluster is under external or non-standard management
|
||||
AnnotationNameManagement = "kops.kubernetes.io/management"
|
||||
|
||||
// AnnotationValueManagementImported is the annotation value that indicates a cluster was imported, typically as part of an upgrade
|
||||
const AnnotationValueManagementImported = "imported"
|
||||
// AnnotationValueManagementImported is the annotation value that indicates a cluster was imported, typically as part of an upgrade
|
||||
AnnotationValueManagementImported = "imported"
|
||||
|
||||
// UpdatePolicyExternal is a value for ClusterSpec.UpdatePolicy indicating that upgrades are done externally, and we should disable automatic upgrades
|
||||
const UpdatePolicyExternal = "external"
|
||||
// UpdatePolicyExternal is a value for ClusterSpec.UpdatePolicy indicating that upgrades are done externally, and we should disable automatic upgrades
|
||||
UpdatePolicyExternal = "external"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -24,11 +24,12 @@ import (
|
|||
"k8s.io/kops/util/pkg/vfs"
|
||||
)
|
||||
|
||||
// Path for the user-specified cluster spec
|
||||
const PathCluster = "config"
|
||||
|
||||
// Path for completed cluster spec in the state store
|
||||
const PathClusterCompleted = "cluster.spec"
|
||||
const (
|
||||
// Path for the user-specified cluster spec
|
||||
PathCluster = "config"
|
||||
// Path for completed cluster spec in the state store
|
||||
PathClusterCompleted = "cluster.spec"
|
||||
)
|
||||
|
||||
func ConfigBase(c *api.Cluster) (vfs.Path, error) {
|
||||
if c.Spec.ConfigBase == "" {
|
||||
|
|
|
|||
|
|
@ -77,9 +77,6 @@ func (b *IAMModelBuilder) Build(c *fi.ModelBuilderContext) error {
|
|||
return fmt.Errorf("unable to parse instance profile name from arn %q: %v", profileARN, err)
|
||||
}
|
||||
err = b.buildIAMTasks(igRole, iamName, c, true)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
// Generate IAM tasks for each managed role
|
||||
|
|
|
|||
Loading…
Reference in New Issue