I have a deployment which contains variuos “Deploy Raw Kubernetes YAML” steps, all of which worked until recently.
I did some small changes, not sure if related, but since today all of the steps succesfully create the yaml resources
but fail on what seems like the end of the step which checks the k8s resource, even though the check is disabled.
Octopus Server version: 2023.3.1807
According to the log, the kubernetes resources are succesfully created.
Successfully authenticated with the Azure CLI
Creating kubectl context to AKS Cluster in resource group RG.DEV called connectedquality-aks (namespace master) using a AzureServicePrincipal
Applying Batch #1 for YAML matching ‘customresource.yml’
‘Deployment/…’ created.
‘Service/…’ created.
“/usr/local/bin/kubectl” version --client --short --request-timeout=1m
Client Version: v1.21.3+k3s1
Found kubectl and successfully verified it can be executed.
But right after that:
System.ArgumentException: An item with the same key has already been added. Key: f49a9cfa-c29b-4b00-ac3d-5726aa616723
at System.Collections.Generic.Dictionary2.TryInsert(TKey key, TValue value, InsertionBehavior behavior) at System.Collections.Generic.Dictionary
2.Add(TKey key, TValue value)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func
2 keySelector, Func2 elementSelector, IEqualityComparer
1 comparer)
at Calamari.Kubernetes.ResourceStatus.ResourceStatusChecker.CheckStatusUntilCompletionOrTimeout(IEnumerable1 resourceIdentifiers, ITimer timer, Kubectl kubectl, Options options) in C:\BuildAgent\work\e0cefbed4ad11812\source\Calamari\Kubernetes\ResourceStatus\ResourceStatusChecker.cs:line 59 at Calamari.Kubernetes.ResourceStatus.ResourceStatusReportExecutor.ReportStatus(String workingDirectory, ICommandLineRunner commandLineRunner, Dictionary
2 environmentVars) in C:\BuildAgent\work\e0cefbed4ad11812\source\Calamari\Kubernetes\ResourceStatus\ResourceStatusReportExecutor.cs:line 81
at Calamari.Kubernetes.Conventions.ResourceStatusReportConvention.Install(RunningDeployment deployment) in C:\BuildAgent\work\e0cefbed4ad11812\source\Calamari\Kubernetes\Conventions\ResourceStatusReportConvention.cs:line 21
at Calamari.Deployment.ConventionProcessor.RunInstallConventions() in C:\BuildAgent\work\e0cefbed4ad11812\source\Calamari.Shared\Deployment\ConventionProcessor.cs:line 71
at Calamari.Deployment.ConventionProcessor.RunConventions() in C:\BuildAgent\work\e0cefbed4ad11812\source\Calamari.Shared\Deployment\ConventionProcessor.cs:line 29
Running rollback conventions…
An item with the same key has already been added. Key: f49a9cfa-c29b-4b00-ac3d-5726aa616723
System.ArgumentException
at System.Collections.Generic.Dictionary2.TryInsert(TKey key, TValue value, InsertionBehavior behavior) at System.Collections.Generic.Dictionary
2.Add(TKey key, TValue value)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func
2 keySelector, Func2 elementSelector, IEqualityComparer
1 comparer)
at Calamari.Kubernetes.ResourceStatus.ResourceStatusChecker.CheckStatusUntilCompletionOrTimeout(IEnumerable1 resourceIdentifiers, ITimer timer, Kubectl kubectl, Options options) in C:\BuildAgent\work\e0cefbed4ad11812\source\Calamari\Kubernetes\ResourceStatus\ResourceStatusChecker.cs:line 59 at Calamari.Kubernetes.ResourceStatus.ResourceStatusReportExecutor.ReportStatus(String workingDirectory, ICommandLineRunner commandLineRunner, Dictionary
2 environmentVars) in C:\BuildAgent\work\e0cefbed4ad11812\source\Calamari\Kubernetes\ResourceStatus\ResourceStatusReportExecutor.cs:line 81
at Calamari.Kubernetes.Conventions.ResourceStatusReportConvention.Install(RunningDeployment deployment) in C:\BuildAgent\work\e0cefbed4ad11812\source\Calamari\Kubernetes\Conventions\ResourceStatusReportConvention.cs:line 21
at Calamari.Deployment.ConventionProcessor.RunInstallConventions() in C:\BuildAgent\work\e0cefbed4ad11812\source\Calamari.Shared\Deployment\ConventionProcessor.cs:line 71
at Calamari.Deployment.ConventionProcessor.RunConventions() in C:\BuildAgent\work\e0cefbed4ad11812\source\Calamari.Shared\Deployment\ConventionProcessor.cs:line 29
at Calamari.Kubernetes.Commands.KubernetesApplyRawYamlCommand.Execute(String commandLineArguments) in C:\BuildAgent\work\e0cefbed4ad11812\source\Calamari\Kubernetes\Commands\KubernetesApplyRawYamlCommand.cs:line 116
at Calamari.Program.ResolveAndExecuteCommand(IContainer container, CommonOptions options) in C:\BuildAgent\work\e0cefbed4ad11812\source\Calamari\Program.cs:line 57
at Calamari.Common.CalamariFlavourProgram.Run(String args) in C:\BuildAgent\work\e0cefbed4ad11812\source\Calamari.Common\CalamariFlavourProgram.cs:line 80
Process /bin/bash in /etc/octopus/default/Work/20230626085851-3880-689 exited with code 100