-
Notifications
You must be signed in to change notification settings - Fork 4k
AzureRmKubernetes cmdlets for managed Kubernetes #5087
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Restarted the travis build: no idea why it died. |
Looks like there are some errors with api version namespaces? |
1b8aa15
to
0922c44
Compare
3f066cc
to
1d86f19
Compare
@devigned I'll assign this back to you for the moment, please reassign it to me when you're ready for me to take a look. Thanks! |
PSData = @{ | ||
|
||
# Tags applied to this module. These help with module discovery in online galleries. | ||
Tags = 'Azure','Kubernetes','ARM','Provider','AKS' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs the tags that indicates this runs on core (Linux, Mac) - this is the mechanism that the posh team is using to differentiate module compatible with PowerShell Core.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What tags would those be? As far as I can tell, AzureRM.Profile.Netcore.psd1 doesn't have any tags that jump out at me which scream netcore (Tags = 'Azure','ResourceManager','ARM','Profile','Authentication','Environment','Subscription'
).
RequiredModules = @(@{ModuleName = 'AzureRM.Profile'; ModuleVersion = '4.0.0'; }) | ||
|
||
# Assemblies that must be loaded prior to importing this module | ||
RequiredAssemblies = '.\YamlDotNet.dll' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All assemblies required by the cmdlet assembly should go here, normally this includes the associated management library.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The generated management library is included in the command module. This will need to be removed and replaced with a reference when the SDK is produced.
PSData = @{ | ||
|
||
# Tags applied to this module. These help with module discovery in online galleries. | ||
Tags = 'Azure','ResourceManager','ARM','AKS', 'Kubernetes' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Container?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure!
} | ||
|
||
[Fact] | ||
public void MergedKubeConfigOverwriteClustersTest() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use traits to mark these as check-in tests ([Trait(Category.AcceptanceType, Category.CheckIn)]
these constants are in the common scenario test assembly
$location = Get-ProviderLocation "Microsoft.ContainerService/managedClusters" | ||
|
||
New-AzureRmResourceGroup -Name $resourceGroupName -Location $location | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am assuming this will contain a CRUD test at some point.
_dashPod = dashPod; | ||
} | ||
|
||
public override string StatusMessage { get; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to implement.
namespace Microsoft.Azure.Commands.Kubernetes | ||
{ | ||
[Cmdlet("Stop", KubeNounStr + "Dashboard")] | ||
public class StopDashboard : KubeCmdletBase |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know that we need this. If we return a job from the first cmdlet, the user can simply stop it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It not needed by someone that understands powershell jobs, but it does give a simple way to kill the job if you are not adept with Jobs.
@@ -0,0 +1,3 @@ | |||
Import-Module -Name ./src/Package/Release/ResourceManager/AzureRM.Profile.Netcore/AzureRM.Profile.Netcore.psd1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was just for testing. I'll drop it before the PR is final.
PS C:\> Stop-AzureRmKubernetes | ||
``` | ||
|
||
{{ Add example description here }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please ensure that you fill these out in the markdown files.
@@ -0,0 +1,6 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<configuration> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the changes below this are unintentional, right?
|
||
namespace Microsoft.Azure.Commands.Kubernetes | ||
{ | ||
[Cmdlet(VerbsCommon.New, KubeNounStr, DefaultParameterSetName = DefaultParamSet)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All action cmdlets should include supportsshouldprocess: more info here
public SwitchParameter AsJob { get; set; } | ||
|
||
[Parameter(Mandatory = false)] | ||
public Hashtable Tags { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename to "Tag" (more info here)
@markcowl and @maddieclayton I the PR has had most of the boulders excavated and is ready for nits and finer review. I believe I've addressed all of the feedback thus far. I think I need to clean up some signing errors, but that should be about it. Let me know if there are any other changes you'd like me to make. |
1cbf85e
to
dd6e688
Compare
@markcowl it looks like the errors in the build are caused by a project I haven't touched. Thoughts? |
@azuresdkci Test this please |
@devigned That's a Batch test that fails intermittently, started the build again. |
@markcowl I just rebased again due to another conflicting change merged. |
<HintPath>..\..\..\packages\AutoMapper.6.2.1\lib\net45\AutoMapper.dll</HintPath> | ||
<Private>True</Private> | ||
</Reference> | ||
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@twitchax it is another place we have to change it if we update the common runtime to newtonsoft.json 10, as we plan to do. If this assembly has a specific dependency on newtonsoft.json, other than in its management client, then this should be removed.
@@ -0,0 +1,7 @@ | |||
<?xml version="1.0" encoding="utf-8" ?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need for this file
new on-demand run here: https://azuresdkci.westus2.cloudapp.azure.com/job/powershell-demand/422/ |
Description
This checklist is used to make sure that common guidelines for a pull request are followed. You can find a more complete discussion of PowerShell cmdlet best practices here.
General Guidelines
Testing Guidelines
Cmdlet Signature Guidelines
ShouldProcess
and haveSupportShouldProcess=true
specified in the cmdlet attribute. You can find more information onShouldProcess
here.OutputType
attribute if any output is produced - if the cmdlet produces no output, it should implement aPassThru
parameter.Cmdlet Parameter Guidelines