You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to configure a flux provider in C# to bootstrap my existing Flux files, but I am encountering a weird behaviour that might be a bug.
stringgithubOwner="xxx";stringrepoName="xxx";stringbranch= config.Require("flux_branch");stringpath=$"k8s/clusters/{Deployment.Instance.StackName}";// Read the private key from the local filesystems home directory.stringsshPrivateKey= File.ReadAllText(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile),".ssh","id_rsa"));varfluxProvider=new Provider("flux",new ProviderArgs
{Kubernetes=new ProviderKubernetesArgs
{ConfigPath="~/.kube/config",ConfigContextCluster="k3d-cluster-local"},Git=new ProviderGitArgs
{Url=$"ssh://github.com/{githubOwner}/{repoName}",Branch=branch,// This throws an error for either the PrivateKey or the Password. It differsSsh=new ProviderGitSshArgs(){Username="git",PrivateKey=new StringAsset(sshPrivateKey).ToString(),Password="xxxx"}}});_=new FluxBootstrapGit("flux",new FluxBootstrapGitArgs
{Path=path},new CustomResourceOptions
{Provider=fluxProvider,});
The code throws the following error:
error: cannot encode provider configuration to call ConfigureProvider: objectEncoder failed on property "git": objectEncoder failed on property "ssh": objectEncoder failed on property "password": Expected a string, got: {map[4dabf18193072939515e22adb298388d:{1b47061264138c4ac30d75fd1eb44270} value:{xxxx}]}
Would it be possible to add an example of configuring Flux with SSH and check if some misconfiguration has happened? I am wondering why the setter parsed my string values into maps.
The text was updated successfully, but these errors were encountered:
Sorry I newer answerered - I moved on from this and has since been using OCI as a source. This looks correct to me, and I am sure that I was passing the right password back then. Given the error I guess it might be mapping related to the C# provider . I have experienced this on other plugins.
File: themes/default/content/registry/packages/flux/_index.md
I am trying to configure a flux provider in C# to bootstrap my existing Flux files, but I am encountering a weird behaviour that might be a bug.
The code throws the following error:
error: cannot encode provider configuration to call ConfigureProvider: objectEncoder failed on property "git": objectEncoder failed on property "ssh": objectEncoder failed on property "password": Expected a string, got: {map[4dabf18193072939515e22adb298388d:{1b47061264138c4ac30d75fd1eb44270} value:{xxxx}]}
Would it be possible to add an example of configuring Flux with SSH and check if some misconfiguration has happened? I am wondering why the setter parsed my string values into maps.
The text was updated successfully, but these errors were encountered: