bootstrapGitHubCmd.Flags().StringVar(&githubArgs.sshHostname,"ssh-hostname","","GitHub SSH hostname, to be used when the SSH host differs from the HTTPS one")
bootstrapGitHubCmd.Flags().Var(&githubArgs.path,"path","path relative to the repository root, when specified the cluster sync will be scoped to this path")
bootstrapGitHubCmd.Flags().BoolVar(&githubArgs.delete,"delete",false,"delete repository (used for testing only)")
bootstrapGitLabCmd.Flags().StringVar(&gitlabArgs.sshHostname,"ssh-hostname","","GitLab SSH hostname, to be used when the SSH host differs from the HTTPS one")
bootstrapGitLabCmd.Flags().Var(&gitlabArgs.path,"path","path relative to the repository root, when specified the cluster sync will be scoped to this path")
returnfmt.Errorf("%s is an invalid project name for gitlab.\nIt can contain only letters, digits, emojis, '_', '.', dash, space. It must start with letter, digit, emoji or '_'.",glRepository)
returnfmt.Errorf("%s is an invalid project name for gitlab.\nIt can contain only letters, digits, emojis, '_', '.', dash, space. It must start with letter, digit, emoji or '_'.",gitlabArgs.repository)
@ -98,28 +98,30 @@ var createHelmReleaseCmd = &cobra.Command{
RunE:createHelmReleaseCmdRun,
}
var(
hrNamestring
hrSourceflags.HelmChartSource
hrDependsOn[]string
hrChartstring
hrChartVersionstring
hrTargetNamespacestring
hrValuesFilestring
hrValuesFromflags.HelmReleaseValuesFrom
hrSANamestring
)
typehelmReleaseFlagsstruct{
namestring
sourceflags.HelmChartSource
dependsOn[]string
chartstring
chartVersionstring
targetNamespacestring
valuesFilestring
valuesFromflags.HelmReleaseValuesFrom
saNamestring
}
varhelmReleaseArgshelmReleaseFlags
funcinit(){
createHelmReleaseCmd.Flags().StringVar(&hrName,"release-name","","name used for the Helm release, defaults to a composition of '[<target-namespace>-]<HelmRelease-name>'")
createHelmReleaseCmd.Flags().StringVar(&hrChart,"chart","","Helm chart name or path")
createHelmReleaseCmd.Flags().StringVar(&hrChartVersion,"chart-version","","Helm chart version, accepts a semver range (ignored for charts from GitRepository sources)")
createHelmReleaseCmd.Flags().StringArrayVar(&hrDependsOn,"depends-on",nil,"HelmReleases that must be ready before this release can be installed, supported formats '<name>' and '<namespace>/<name>'")
createHelmReleaseCmd.Flags().StringVar(&hrTargetNamespace,"target-namespace","","namespace to install this release, defaults to the HelmRelease namespace")
createHelmReleaseCmd.Flags().StringVar(&hrSAName,"service-account","","the name of the service account to impersonate when reconciling this HelmRelease")
createHelmReleaseCmd.Flags().StringVar(&hrValuesFile,"values","","local path to the values.yaml file")
createHelmReleaseCmd.Flags().StringVar(&helmReleaseArgs.name,"release-name","","name used for the Helm release, defaults to a composition of '[<target-namespace>-]<HelmRelease-name>'")
createHelmReleaseCmd.Flags().StringVar(&helmReleaseArgs.chart,"chart","","Helm chart name or path")
createHelmReleaseCmd.Flags().StringVar(&helmReleaseArgs.chartVersion,"chart-version","","Helm chart version, accepts a semver range (ignored for charts from GitRepository sources)")
createHelmReleaseCmd.Flags().StringArrayVar(&helmReleaseArgs.dependsOn,"depends-on",nil,"HelmReleases that must be ready before this release can be installed, supported formats '<name>' and '<namespace>/<name>'")
createHelmReleaseCmd.Flags().StringVar(&helmReleaseArgs.targetNamespace,"target-namespace","","namespace to install this release, defaults to the HelmRelease namespace")
createHelmReleaseCmd.Flags().StringVar(&helmReleaseArgs.saName,"service-account","","the name of the service account to impersonate when reconciling this HelmRelease")
createHelmReleaseCmd.Flags().StringVar(&helmReleaseArgs.valuesFile,"values","","local path to the values.yaml file")
createKsCmd.Flags().StringArrayVar(&ksHealthCheck,"health-check",nil,"workload to be included in the health assessment, in the format '<kind>/<name>.<namespace>'")
createKsCmd.Flags().DurationVar(&ksHealthTimeout,"health-check-timeout",2*time.Minute,"timeout of health checking operations")
createKsCmd.Flags().StringVar(&ksValidation,"validation","","validate the manifests before applying them on the cluster, can be 'client' or 'server'")
createKsCmd.Flags().StringArrayVar(&ksDependsOn,"depends-on",nil,"Kustomization that must be ready before this Kustomization can be applied, supported formats '<name>' and '<namespace>/<name>'")
createKsCmd.Flags().StringVar(&ksSAName,"service-account","","the name of the service account to impersonate when reconciling this Kustomization")
createKsCmd.Flags().StringVar(&ksDecryptionSecret,"decryption-secret","","set the Kubernetes secret name that contains the OpenPGP private keys used for sops decryption")
createKsCmd.Flags().StringVar(&ksTargetNamespace,"target-namespace","","overrides the namespace of all Kustomization objects reconciled by this Kustomization")
createKsCmd.Flags().StringArrayVar(&kustomizationArgs.healthCheck,"health-check",nil,"workload to be included in the health assessment, in the format '<kind>/<name>.<namespace>'")
createKsCmd.Flags().DurationVar(&kustomizationArgs.healthTimeout,"health-check-timeout",2*time.Minute,"timeout of health checking operations")
createKsCmd.Flags().StringVar(&kustomizationArgs.validation,"validation","","validate the manifests before applying them on the cluster, can be 'client' or 'server'")
createKsCmd.Flags().StringArrayVar(&kustomizationArgs.dependsOn,"depends-on",nil,"Kustomization that must be ready before this Kustomization can be applied, supported formats '<name>' and '<namespace>/<name>'")
createKsCmd.Flags().StringVar(&kustomizationArgs.saName,"service-account","","the name of the service account to impersonate when reconciling this Kustomization")
createKsCmd.Flags().StringVar(&kustomizationArgs.decryptionSecret,"decryption-secret","","set the Kubernetes secret name that contains the OpenPGP private keys used for sops decryption")
createKsCmd.Flags().StringVar(&kustomizationArgs.targetNamespace,"target-namespace","","overrides the namespace of all Kustomization objects reconciled by this Kustomization")
createSourceGitCmd.Flags().StringVarP(&sourceArgs.GitSecretRef,"secret-ref","","","the name of an existing secret containing SSH or basic credentials")
createSourceHelmCmd.Flags().StringVar(&sourceHelmCAFile,"ca-file","","TLS authentication CA file path")
createSourceHelmCmd.Flags().StringVarP(&sourceHelmSecretRef,"secret-ref","","","the name of an existing secret containing TLS or basic auth credentials")
createSourceHelmCmd.Flags().StringVar(&sourceHelmArgs.caFile,"ca-file","","TLS authentication CA file path")
createSourceHelmCmd.Flags().StringVarP(&sourceHelmArgs.secretRef,"secret-ref","","","the name of an existing secret containing TLS or basic auth credentials")