Skip to content

Commit

Permalink
chore(clustertool): prep for more longer description texts
Browse files Browse the repository at this point in the history
  • Loading branch information
PrivatePuffin committed Oct 25, 2024
1 parent 203b451 commit e09a48e
Show file tree
Hide file tree
Showing 23 changed files with 175 additions and 40 deletions.
7 changes: 7 additions & 0 deletions clustertool/cmd/adv_bootstrap.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
package cmd

import (
"strings"

"github.com/spf13/cobra"
"github.com/truecharts/public/clustertool/pkg/gencmd"
)

var advBootstrapLongHelp = strings.TrimSpace(`
`)

var bootstrap = &cobra.Command{
Use: "bootstrap",
Short: "bootstrap first Talos Node",
Long: advBootstrapLongHelp,
Run: bootstrapfunc,
}

Expand Down
36 changes: 0 additions & 36 deletions clustertool/cmd/adv_fluxbootstrap.go

This file was deleted.

7 changes: 7 additions & 0 deletions clustertool/cmd/adv_health.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
package cmd

import (
"strings"

"github.com/rs/zerolog/log"
"github.com/spf13/cobra"
"github.com/truecharts/public/clustertool/pkg/gencmd"
"github.com/truecharts/public/clustertool/pkg/helper"
"github.com/truecharts/public/clustertool/pkg/sops"
)

var advHealthLongHelp = strings.TrimSpace(`
`)

var health = &cobra.Command{
Use: "health",
Short: "Check Talos Cluster Health",
Long: advHealthLongHelp,
Run: func(cmd *cobra.Command, args []string) {
if err := sops.DecryptFiles(); err != nil {
log.Info().Msgf("Error decrypting files: %v\n", err)
Expand Down
6 changes: 6 additions & 0 deletions clustertool/cmd/adv_precommit.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,21 @@ package cmd

import (
"os"
"strings"

"github.com/rs/zerolog/log"
"github.com/spf13/cobra"
"github.com/truecharts/public/clustertool/pkg/sops"
)

var advPrecommitLongHelp = strings.TrimSpace(`
`)

var precommit = &cobra.Command{
Use: "precommit",
Short: "Runs the PreCommit encryption check",
Long: advPrecommitLongHelp,
Run: func(cmd *cobra.Command, args []string) {
if err := sops.CheckFilesAndReportEncryption(true, true); err != nil {
log.Info().Msgf("Error checking files: %v\n", err)
Expand Down
7 changes: 7 additions & 0 deletions clustertool/cmd/adv_reset.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
package cmd

import (
"strings"

"github.com/rs/zerolog/log"
"github.com/spf13/cobra"
"github.com/truecharts/public/clustertool/pkg/gencmd"
"github.com/truecharts/public/clustertool/pkg/sops"
)

var advResetLongHelp = strings.TrimSpace(`
`)

var reset = &cobra.Command{
Use: "reset",
Short: "Reset Talos Nodes and Kubernetes",
Long: advResetLongHelp,
Run: func(cmd *cobra.Command, args []string) {
var extraArgs []string
node := ""
Expand Down
7 changes: 7 additions & 0 deletions clustertool/cmd/adv_testcmd.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
package cmd

import (
"strings"

"github.com/rs/zerolog/log"
"github.com/spf13/cobra"
"github.com/truecharts/public/clustertool/pkg/gencmd"
"github.com/truecharts/public/clustertool/pkg/initfiles"
)

var advTestCmdlongHelp = strings.TrimSpace(`
`)

var testcmd = &cobra.Command{
Use: "test",
Short: "test run",
Long: advTestCmdlongHelp,
Run: func(cmd *cobra.Command, args []string) {
initfiles.LoadTalEnv(false)
// err := fluxhandler.ProcessJSONFiles("./testdata/truenas_exports")
Expand Down
7 changes: 7 additions & 0 deletions clustertool/cmd/apply.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package cmd

import (
"strings"

"github.com/rs/zerolog/log"
"github.com/spf13/cobra"
"github.com/truecharts/public/clustertool/pkg/gencmd"
Expand All @@ -9,9 +11,14 @@ import (
"github.com/truecharts/public/clustertool/pkg/sops"
)

var applyLongHelp = strings.TrimSpace(`
`)

var apply = &cobra.Command{
Use: "apply",
Short: "apply TalosConfig",
Long: applyLongHelp,
Run: func(cmd *cobra.Command, args []string) {
var extraArgs []string
node := ""
Expand Down
7 changes: 7 additions & 0 deletions clustertool/cmd/charts_bump.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
package cmd

import (
"strings"

"github.com/rs/zerolog/log"
"github.com/spf13/cobra"
"github.com/truecharts/public/clustertool/pkg/charts/version"
)

var chartsBumpLongHelp = strings.TrimSpace(`
`)

var bumper = &cobra.Command{
Use: "bump",
Short: "generate a bumped image version",
Long: chartsBumpLongHelp,
Example: "charttool bump <version> <kind>",
Args: cobra.ExactArgs(2),
Run: func(cmd *cobra.Command, args []string) {
Expand Down
7 changes: 7 additions & 0 deletions clustertool/cmd/charts_deps.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
package cmd

import (
"strings"

"github.com/rs/zerolog/log"
"github.com/spf13/cobra"
"github.com/truecharts/public/clustertool/pkg/charts/deps"
"github.com/truecharts/public/clustertool/pkg/helper"
)

var chartsDepsLongHelp = strings.TrimSpace(`
`)

var depsCmd = &cobra.Command{
Use: "deps",
Short: "Download, Update and Verify Helm dependencies",
Long: chartsDepsLongHelp,
Example: "charttool deps <chart> <chart> <chart>",
Run: func(cmd *cobra.Command, args []string) {
if err := deps.LoadGPGKey(); err != nil {
Expand Down
7 changes: 7 additions & 0 deletions clustertool/cmd/charts_genchangelog.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
package cmd

import (
"strings"

"github.com/rs/zerolog/log"

"github.com/spf13/cobra"
"github.com/truecharts/public/clustertool/pkg/charts/changelog"
)

var chartsGenChangelogLongHelp = strings.TrimSpace(`
`)

var genChangelogCmd = &cobra.Command{
Use: "genchangelog",
Short: "Generate changelog for charts",
Long: chartsGenChangelogLongHelp,
Example: "charttool genchangelog <repo path> <template path> <charts dir>",
Run: func(cmd *cobra.Command, args []string) {
if len(args) < 3 {
Expand Down
7 changes: 7 additions & 0 deletions clustertool/cmd/charts_genchartlist.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
package cmd

import (
"strings"

"github.com/rs/zerolog/log"

"github.com/spf13/cobra"
"github.com/truecharts/public/clustertool/pkg/charts/website"
"github.com/truecharts/public/clustertool/pkg/helper"
)

var chartsGenChartsListLongHelp = strings.TrimSpace(`
`)

var genChartListCmd = &cobra.Command{
Use: "genchartlist",
Short: "Generate chart list json file",
Long: chartsGenChartsListLongHelp,
Example: "charttool genchartlist <path to charts folder>",
Run: func(cmd *cobra.Command, args []string) {
opts := &website.ChartListOptions{
Expand Down
7 changes: 7 additions & 0 deletions clustertool/cmd/charts_genmeta.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package cmd

import (
"strings"

"github.com/rs/zerolog/log"

"slices"
Expand All @@ -10,9 +12,14 @@ import (
"github.com/truecharts/public/clustertool/pkg/helper"
)

var chartsGenMetaLongHelp = strings.TrimSpace(`
`)

var genMetaCmd = &cobra.Command{
Use: "genmeta",
Short: "Generate and update Chart.yaml metadata",
Long: chartsGenMetaLongHelp,
Run: func(cmd *cobra.Command, args []string) {
bump := ""
if len(args) > 0 && slices.Contains([]string{"patch", "minor", "major"}, args[0]) {
Expand Down
7 changes: 7 additions & 0 deletions clustertool/cmd/charts_tagclean.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
package cmd

import (
"strings"

"github.com/rs/zerolog/log"

"github.com/spf13/cobra"
"github.com/truecharts/public/clustertool/pkg/charts/image"
)

var chartsTagCleanLongHelp = strings.TrimSpace(`
`)

var tagCleaner = &cobra.Command{
Use: "tagcleaner",
Short: "Creates a clean version tag from a container digest",
Long: chartsTagCleanLongHelp,
Example: "charttool tagcleaner <tag>",
Args: cobra.ExactArgs(1),
Run: func(cmd *cobra.Command, args []string) {
Expand Down
6 changes: 6 additions & 0 deletions clustertool/cmd/checkcrypt.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,21 @@ package cmd

import (
"os"
"strings"

"github.com/rs/zerolog/log"
"github.com/spf13/cobra"
"github.com/truecharts/public/clustertool/pkg/sops"
)

var checkcyptLongHelp = strings.TrimSpace(`
`)

var checkcrypt = &cobra.Command{
Use: "checkcrypt",
Short: "Checks if all files are encrypted correctly in accordance with .sops.yaml",
Long: checkcyptLongHelp,
Run: func(cmd *cobra.Command, args []string) {
if err := sops.CheckFilesAndReportEncryption(false, false); err != nil {
log.Info().Msgf("Error checking files: %v\n", err)
Expand Down
7 changes: 7 additions & 0 deletions clustertool/cmd/decrypt.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
package cmd

import (
"strings"

"github.com/rs/zerolog/log"
"github.com/spf13/cobra"
"github.com/truecharts/public/clustertool/pkg/sops"
)

var decryptLongHelp = strings.TrimSpace(`
`)

var decrypt = &cobra.Command{
Use: "decrypt",
Short: "Decrypt all high-risk data using sops",
Long: decryptLongHelp,
Run: func(cmd *cobra.Command, args []string) {
if err := sops.DecryptFiles(); err != nil {
log.Info().Msgf("Error decrypting files: %v\n", err)
Expand Down
7 changes: 7 additions & 0 deletions clustertool/cmd/encrypt.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
package cmd

import (
"strings"

"github.com/rs/zerolog/log"
"github.com/spf13/cobra"
"github.com/truecharts/public/clustertool/pkg/sops"
)

var encryptLongHelp = strings.TrimSpace(`
`)

var encrypt = &cobra.Command{
Use: "encrypt",
Short: "Encrypt all high-risk data using sops",
Long: encryptLongHelp,
Run: func(cmd *cobra.Command, args []string) {
if err := sops.EncryptAllFiles(); err != nil {
log.Info().Msgf("Error encrypting files: %v\n", err)
Expand Down
Loading

0 comments on commit e09a48e

Please sign in to comment.