Skip to content
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

Add namespace to Kubernetes task UI #4657

Merged
merged 5 commits into from Jan 4, 2018
Merged
Diff settings

Always

Just for now

Next

Adding namespace for Kube task

  • Loading branch information...
colindembovsky committed Jun 27, 2017
commit 74b625711f4c9d03041b67625dceeceffc1f70fd
@@ -17,7 +17,9 @@
"loc.input.label.azureContainerRegistry": "Azure Container Registry",
"loc.input.help.azureContainerRegistry": "Select an Azure Container Registry. Required for commands that need to authenticate with a registry.",
"loc.input.label.secretName": "Secret name",
"loc.input.label.namespace": "Namespace",
"loc.input.help.secretName": "Name of the docker-registry secret. You can use this secret name in the Kubernetes YAML configuration file.",
"loc.input.help.namespace": "Name of the namespace to run the command in.",
"loc.input.label.forceUpdate": "Force update secret",
"loc.input.help.forceUpdate": "Delete the docker-registry secret if it exists and create a new one with updated values.",
"loc.input.label.command": "Command",
@@ -17,7 +17,9 @@
"loc.input.label.azureContainerRegistry": "Azure Container Registry",
"loc.input.help.azureContainerRegistry": "Select an Azure Container Registry. Required for commands that need to authenticate with a registry.",
"loc.input.label.secretName": "Secret name",
"loc.input.label.namespace": "Namespace",
"loc.input.help.secretName": "Name of the docker-registry secret. You can use this secret name in the Kubernetes YAML configuration file.",
"loc.input.help.namespace": "Name of the namespace to run the command in.",
"loc.input.label.forceUpdate": "Force update secret",
"loc.input.help.forceUpdate": "Delete the docker-registry secret if it exists and create a new one with updated values.",
"loc.input.label.command": "Command",
@@ -17,7 +17,9 @@
"loc.input.label.azureContainerRegistry": "Azure Container Registry",
"loc.input.help.azureContainerRegistry": "Select an Azure Container Registry. Required for commands that need to authenticate with a registry.",
"loc.input.label.secretName": "Secret name",
"loc.input.label.namespace": "Namespace",
"loc.input.help.secretName": "Name of the docker-registry secret. You can use this secret name in the Kubernetes YAML configuration file.",
"loc.input.help.namespace": "Name of the namespace to run the command in.",
"loc.input.label.forceUpdate": "Force update secret",
"loc.input.help.forceUpdate": "Delete the docker-registry secret if it exists and create a new one with updated values.",
"loc.input.label.command": "Command",
@@ -17,7 +17,9 @@
"loc.input.label.azureContainerRegistry": "Azure Container Registry",
"loc.input.help.azureContainerRegistry": "Select an Azure Container Registry. Required for commands that need to authenticate with a registry.",
"loc.input.label.secretName": "Secret name",
"loc.input.label.namespace": "Namespace",
"loc.input.help.secretName": "Name of the docker-registry secret. You can use this secret name in the Kubernetes YAML configuration file.",
"loc.input.help.namespace": "Name of the namespace to run the command in.",
"loc.input.label.forceUpdate": "Force update secret",
"loc.input.help.forceUpdate": "Delete the docker-registry secret if it exists and create a new one with updated values.",
"loc.input.label.command": "Command",
@@ -17,7 +17,9 @@
"loc.input.label.azureContainerRegistry": "Azure Container Registry",
"loc.input.help.azureContainerRegistry": "Select an Azure Container Registry. Required for commands that need to authenticate with a registry.",
"loc.input.label.secretName": "Secret name",
"loc.input.label.namespace": "Namespace",
"loc.input.help.secretName": "Name of the docker-registry secret. You can use this secret name in the Kubernetes YAML configuration file.",
"loc.input.help.namespace": "Name of the namespace to run the command in.",
"loc.input.label.forceUpdate": "Force update secret",
"loc.input.help.forceUpdate": "Delete the docker-registry secret if it exists and create a new one with updated values.",
"loc.input.label.command": "Command",
@@ -17,7 +17,9 @@
"loc.input.label.azureContainerRegistry": "Azure Container Registry",
"loc.input.help.azureContainerRegistry": "Select an Azure Container Registry. Required for commands that need to authenticate with a registry.",
"loc.input.label.secretName": "Secret name",
"loc.input.label.namespace": "Namespace",
"loc.input.help.secretName": "Name of the docker-registry secret. You can use this secret name in the Kubernetes YAML configuration file.",
"loc.input.help.namespace": "Name of the namespace to run the command in.",
"loc.input.label.forceUpdate": "Force update secret",
"loc.input.help.forceUpdate": "Delete the docker-registry secret if it exists and create a new one with updated values.",
"loc.input.label.command": "Command",
@@ -17,7 +17,9 @@
"loc.input.label.azureContainerRegistry": "Azure Container Registry",
"loc.input.help.azureContainerRegistry": "Select an Azure Container Registry. Required for commands that need to authenticate with a registry.",
"loc.input.label.secretName": "Secret name",
"loc.input.label.namespace": "Namespace",
"loc.input.help.secretName": "Name of the docker-registry secret. You can use this secret name in the Kubernetes YAML configuration file.",
"loc.input.help.namespace": "Name of the namespace to run the command in.",
"loc.input.label.forceUpdate": "Force update secret",
"loc.input.help.forceUpdate": "Delete the docker-registry secret if it exists and create a new one with updated values.",
"loc.input.label.command": "Command",
@@ -17,7 +17,9 @@
"loc.input.label.azureContainerRegistry": "Azure Container Registry",
"loc.input.help.azureContainerRegistry": "Select an Azure Container Registry. Required for commands that need to authenticate with a registry.",
"loc.input.label.secretName": "Secret name",
"loc.input.label.namespace": "Namespace",
"loc.input.help.secretName": "Name of the docker-registry secret. You can use this secret name in the Kubernetes YAML configuration file.",
"loc.input.help.namespace": "Name of the namespace to run the command in.",
"loc.input.label.forceUpdate": "Force update secret",
"loc.input.help.forceUpdate": "Delete the docker-registry secret if it exists and create a new one with updated values.",
"loc.input.label.command": "Command",
@@ -17,7 +17,9 @@
"loc.input.label.azureContainerRegistry": "Azure Container Registry",
"loc.input.help.azureContainerRegistry": "Select an Azure Container Registry. Required for commands that need to authenticate with a registry.",
"loc.input.label.secretName": "Secret name",
"loc.input.label.namespace": "Namespace",
"loc.input.help.secretName": "Name of the docker-registry secret. You can use this secret name in the Kubernetes YAML configuration file.",
"loc.input.help.namespace": "Name of the namespace to run the command in.",
"loc.input.label.forceUpdate": "Force update secret",
"loc.input.help.forceUpdate": "Delete the docker-registry secret if it exists and create a new one with updated values.",
"loc.input.label.command": "Command",
@@ -17,7 +17,9 @@
"loc.input.label.azureContainerRegistry": "Azure Container Registry",
"loc.input.help.azureContainerRegistry": "Select an Azure Container Registry. Required for commands that need to authenticate with a registry.",
"loc.input.label.secretName": "Secret name",
"loc.input.label.namespace": "Namespace",
"loc.input.help.secretName": "Name of the docker-registry secret. You can use this secret name in the Kubernetes YAML configuration file.",
"loc.input.help.namespace": "Name of the namespace to run the command in.",
"loc.input.label.forceUpdate": "Force update secret",
"loc.input.help.forceUpdate": "Delete the docker-registry secret if it exists and create a new one with updated values.",
"loc.input.label.command": "Command",
@@ -55,5 +55,11 @@ function getCommandArguments(): string[] {
args = argument.split(" ");
}

// add in the namespace (if present)
var ns = tl.getInput("namespace", false);
if (ns){
args.push(`--namespace=${ns}`);
}

return args;
}
Copy path View file
@@ -150,6 +150,15 @@
"helpMarkDown": "Command arguments.",
"groupName": "commands"
},
{
"name": "namespace",
"type": "string",
"label": "Namespace",
"required": false,
"defaultValue": "",
"helpMarkDown": "Name of the namespace to run the command in.",
"groupName": "commands"
},
{
"name": "cwd",
"type": "filePath",
@@ -150,6 +150,15 @@
"helpMarkDown": "ms-resource:loc.input.help.arguments",
"groupName": "commands"
},
{
"name": "namespace",
"type": "string",
"label": "ms-resource:loc.input.label.namespace",
"required": false,
"defaultValue": "",
"helpMarkDown": "ms-resource:loc.input.help.namespace",
"groupName": "commands"
},
{
"name": "cwd",
"type": "filePath",
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.