Documentation ¶
Overview ¶
Copyright (C) 2021-2023, Kubefirst
This program is licensed under MIT. See the LICENSE file for more details.
Copyright (C) 2021-2023, Kubefirst ¶
This program is licensed under MIT. See the LICENSE file for more details.
Copyright (C) 2021-2023, Kubefirst ¶
This program is licensed under MIT. See the LICENSE file for more details.
Copyright (C) 2021-2023, Kubefirst ¶
This program is licensed under MIT. See the LICENSE file for more details.
Copyright (C) 2021-2023, Kubefirst ¶
This program is licensed under MIT. See the LICENSE file for more details.
Copyright (C) 2021-2023, Kubefirst ¶
This program is licensed under MIT. See the LICENSE file for more details.
Index ¶
- Constants
- Variables
- func ApplicationCleanup(clientset kubernetes.Interface, removeApps []string) error
- func ApplyArgoCDKustomize(clientset kubernetes.Interface, argoCDInstallPath string) error
- func DeleteApplication(httpClient pkg.HTTPDoer, applicationName, argoCDToken, cascade string) (int, string, error)
- func GetArgoCDApplication(token string, applicationName string) (*argocdModel.V1alpha1Application, error)
- func GetArgoCDApplicationObject(gitopsRepoURL, registryPath string) *v1alpha1ArgocdApplication.Application
- func GetArgoCDToken(username string, password string) (string, error)
- func GetArgoEndpoint() string
- func GetArgocdTokenV2(argocdBaseURL string, username string, password string) (string, error)
- func RefreshApplication(host, token, appName string) error
- func RefreshRegistryApplication(host, token string) error
- func RestPatchArgoCD(clientset kubernetes.Interface, applicationName string, payload []byte) error
- type Config
- type PatchStringValue
- type TLSConfig
Constants ¶
const ArgoCDAPIVersion string = "argoproj.io/v1alpha1"
Variables ¶
var ArgocdSecretClient coreV1Types.SecretInterface
Functions ¶
func ApplicationCleanup ¶ added in v0.106.0
func ApplicationCleanup(clientset kubernetes.Interface, removeApps []string) error
ApplicationCleanup removes and waits for specific ArgoCD applications
func ApplyArgoCDKustomize ¶
func ApplyArgoCDKustomize(clientset kubernetes.Interface, argoCDInstallPath string) error
ApplyArgoCDKustomize
func DeleteApplication ¶
func DeleteApplication(httpClient pkg.HTTPDoer, applicationName, argoCDToken, cascade string) (int, string, error)
Sync request ArgoCD to manual sync an application.
func GetArgoCDApplication ¶
func GetArgoCDApplication(token string, applicationName string) (*argocdModel.V1alpha1Application, error)
GetArgoCDApplication by receiving the ArgoCD token, and the application name, this function returns the full application data Application struct. This can be used when a resource needs to be updated, we firstly collect all Application data, update what is necessary and then request the PUT function to update the resource.
func GetArgoCDApplicationObject ¶
func GetArgoCDApplicationObject(gitopsRepoURL, registryPath string) *v1alpha1ArgocdApplication.Application
func GetArgoCDToken ¶
GetArgoCDToken expects ArgoCD username and password, and returns a ArgoCD Bearer Token. ArgoCD username and password are stored in the viper file.
func GetArgoEndpoint ¶
func GetArgoEndpoint() string
GetArgoEndpoint provides a solution in the interim for returning the correct endpoint address
func GetArgocdTokenV2 ¶
GetArgocdTokenV2
func RefreshApplication ¶
RefreshApplication forces the registry application to fetch upstream manifests
func RefreshRegistryApplication ¶
RefreshRegistryApplication forces the registry application to fetch upstream manifests
func RestPatchArgoCD ¶
func RestPatchArgoCD(clientset kubernetes.Interface, applicationName string, payload []byte) error
RestPatchArgoCD uses RESTClient to patch a given ArgoCD Application using the provided payload
Types ¶
type Config ¶
type Config struct { Configs struct { Repositories struct { SoftServeGitops struct { URL string `yaml:"url,omitempty"` Insecure string `json:"insecure,omitempty"` Type string `json:"type,omitempty"` Name string `json:"name,omitempty"` } `yaml:"soft-serve-gitops,omitempty"` RepoGitops struct { URL string `yaml:"url,omitempty"` Type string `yaml:"type,omitempty"` Name string `yaml:"name,omitempty"` } `yaml:"github-serve-gitops,omitempty"` } `yaml:"repositories,omitempty"` CredentialTemplates struct { SSHCreds struct { URL string `yaml:"url,omitempty"` SSHPrivateKey string `yaml:"sshPrivateKey,omitempty"` } `yaml:"ssh-creds,omitempty"` } `yaml:"credentialTemplates,omitempty"` } `yaml:"configs,omitempty"` Server struct { ExtraArgs []string `yaml:"extraArgs,omitempty"` Ingress struct { Enabled string `yaml:"enabled,omitempty"` Annotations struct { IngressKubernetesIoRewriteTarget string `yaml:"ingress.kubernetes.io/rewrite-target,omitempty"` IngressKubernetesIoBackendProtocol string `yaml:"ingress.kubernetes.io/backend-protocol,omitempty"` } `yaml:"annotations,omitempty"` Hosts []string `yaml:"hosts,omitempty"` TLS []TLSConfig `yaml:"tls,omitempty"` } `yaml:"ingress,omitempty"` } `yaml:"server,omitempty"` }
todo call this ArgocdConfig or something not so generic Config ArgoCD configuration
type PatchStringValue ¶
type PatchStringValue struct { Op string `json:"op"` Path string `json:"path"` Value string `json:"value"` }
PatchStringValue specifies a patch operation for a string