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 ApplyArgoCDKustomize(clientset *kubernetes.Clientset, argoCDInstallPath string) error
- func ArgoCDApplicationCleanup(clientset kubernetes.Interface, removeApps []string) error
- func DeleteApplication(httpClient pkg.HTTPDoer, applicationName, argoCDToken, cascade string) (httpCodeResponse int, syncStatus string, Error 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(httpClient *http.Client, argocdBaseURL string, username string, ...) (string, error)
- func RefreshApplication(host string, token string, appName string) error
- func RefreshRegistryApplication(host string, 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 ApplyArgoCDKustomize ¶
func ApplyArgoCDKustomize(clientset *kubernetes.Clientset, argoCDInstallPath string) error
ApplyArgoCDKustomize
func ArgoCDApplicationCleanup ¶
func ArgoCDApplicationCleanup(clientset kubernetes.Interface, removeApps []string) error
ArgoCDApplicationCleanup removes and waits for specific ArgoCD applications
func DeleteApplication ¶
func DeleteApplication(httpClient pkg.HTTPDoer, applicationName, argoCDToken, cascade string) (httpCodeResponse int, syncStatus string, Error 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 ¶
func GetArgocdTokenV2(httpClient *http.Client, argocdBaseURL string, username string, password string) (string, error)
GetArgocdTokenV2
func RefreshApplication ¶ added in v0.3.14
RefreshApplication forces the registry application to fetch upstream manifests
func RefreshRegistryApplication ¶ added in v0.1.72
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