correct paths
This commit is contained in:
@@ -11,7 +11,7 @@ import (
|
|||||||
var cleanupCmd = &cobra.Command{
|
var cleanupCmd = &cobra.Command{
|
||||||
Use: "cleanup",
|
Use: "cleanup",
|
||||||
Short: "Clean up provisioned resources",
|
Short: "Clean up provisioned resources",
|
||||||
Long: `Clean up provisioned infrastructure components like Kubernetes clusters, PostgreSQL, etc.`,
|
Long: `Clean up provisioned infrastructure components like Kubernetes clusters etc.`,
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
cleanupInteractive()
|
cleanupInteractive()
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ type Config struct {
|
|||||||
|
|
||||||
// LoadDefaultConfig loads the default Kubernetes configuration from the defaults file
|
// LoadDefaultConfig loads the default Kubernetes configuration from the defaults file
|
||||||
func LoadDefaultConfig() (*Config, error) {
|
func LoadDefaultConfig() (*Config, error) {
|
||||||
defaultsPath := "ansible/defaults/kubernetes.yml"
|
defaultsPath := "../../../ansible/defaults/kubernetes.yml"
|
||||||
|
|
||||||
data, err := os.ReadFile(defaultsPath)
|
data, err := os.ReadFile(defaultsPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -209,8 +209,8 @@ func ProvisionInteractive() error {
|
|||||||
// runProvisionScript runs the actual Kubernetes provisioning
|
// runProvisionScript runs the actual Kubernetes provisioning
|
||||||
func runProvisionScript(configPath string) error {
|
func runProvisionScript(configPath string) error {
|
||||||
// Run the ansible playbook with custom variables
|
// Run the ansible playbook with custom variables
|
||||||
inventory := "ansible/inventories/kubernetes.yml"
|
inventory := "../../../ansible/inventories/kubernetes.yml"
|
||||||
playbook := "ansible/playbooks/kubernetes.yml"
|
playbook := "../../../ansible/playbooks/kubernetes.yml"
|
||||||
|
|
||||||
// Check if files exist
|
// Check if files exist
|
||||||
if _, err := os.Stat(inventory); os.IsNotExist(err) {
|
if _, err := os.Stat(inventory); os.IsNotExist(err) {
|
||||||
@@ -226,7 +226,7 @@ func runProvisionScript(configPath string) error {
|
|||||||
|
|
||||||
// Cleanup handles Kubernetes cluster cleanup
|
// Cleanup handles Kubernetes cluster cleanup
|
||||||
func Cleanup() error {
|
func Cleanup() error {
|
||||||
scriptPath := "scripts/cleanup-kubernetes.sh"
|
scriptPath := "../../../scripts/cleanup-kubernetes.sh"
|
||||||
|
|
||||||
// Check if script exists
|
// Check if script exists
|
||||||
if _, err := os.Stat(scriptPath); os.IsNotExist(err) {
|
if _, err := os.Stat(scriptPath); os.IsNotExist(err) {
|
||||||
|
|||||||
Reference in New Issue
Block a user