Skip to content

Commit

Permalink
feat(kubernetes): default new and unspecified accounts to V2
Browse files Browse the repository at this point in the history
  • Loading branch information
maggieneterval committed Feb 25, 2020
1 parent 5e50ea8 commit f53a4d4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -9556,7 +9556,7 @@ This can only be set when --kinds is empty or not set.
This can only be set when --namespaces is empty or not set.
* `--only-spinnaker-managed`: (*Default*: `false`) (V2 Only) When true, Spinnaker will only cache/display applications that have been
created by Spinnaker; as opposed to attempting to configure applications for resources already present in Kubernetes.
* `--provider-version`: There are currently two versions of the Kubernetes Provider: V1 and V2. This allows you to pick the version of the provider (not the resources it manages) to run within Spinnaker.V1 is scheduled for removal in Spinnaker 1.21; we recommend using V2 only.
* `--provider-version`: (*Default*: `v2`) There are currently two versions of the Kubernetes Provider: V1 and V2. This allows you to pick the version of the provider (not the resources it manages) to run within Spinnaker.V1 is scheduled for removal in Spinnaker 1.21; we recommend using V2 only.
* `--read-permissions`: (*Default*: `[]`) A user must have at least one of these roles in order to view this account's cloud resources.
* `--required-group-membership`: (*Default*: `[]`) A user must be a member of at least one specified group in order to make changes to this account's cloud resources.
* `--service-account`: When true, Spinnaker attempt to authenticate against Kubernetes using a Kubernetes service account. This only works when Halyard & Spinnaker are deployed in Kubernetes. Read more about service accounts here: [https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ protected String getProviderName() {
@Parameter(
names = "--provider-version",
description = KubernetesCommandProperties.PROVIDER_VERSION_DESCRIPTION)
private ProviderVersion providerVersion;
private ProviderVersion providerVersion = ProviderVersion.V2;

@Override
protected Account buildAccount(String accountName) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import com.netflix.spinnaker.halyard.config.config.v1.ArtifactSourcesConfig;
import com.netflix.spinnaker.halyard.config.model.v1.node.DeploymentConfiguration;
import com.netflix.spinnaker.halyard.config.model.v1.node.LocalFile;
import com.netflix.spinnaker.halyard.config.model.v1.node.Provider.ProviderVersion;
import com.netflix.spinnaker.halyard.config.model.v1.node.SecretFile;
import com.netflix.spinnaker.halyard.config.model.v1.node.ValidForSpinnakerVersion;
import com.netflix.spinnaker.halyard.config.model.v1.providers.containers.ContainerAccount;
Expand All @@ -32,6 +33,7 @@
@Data
@EqualsAndHashCode(callSuper = true)
public class KubernetesAccount extends ContainerAccount implements Cloneable {
ProviderVersion providerVersion = ProviderVersion.V2;
String context;
String cluster;
String user;
Expand Down

0 comments on commit f53a4d4

Please sign in to comment.