<commit_before>require "admiral"
require "./concerns/*"

class Psykube::Commands::CopyNamespace < Admiral::Command
  DEFAULT_RESOURCES = "cm,ds,secrets,deploy,jobs,pvc,limits,rc,svc,statefulsets"

  include Kubectl
  include PsykubeFileFlag
  include KubectlContextFlag

  define_help description: "Copy one namespace to another."

  define_flag cluster, "The cluster configuration to use.", default: "default"
  define_flag resources : String,
    description: "The resource types to copy.",
    short: r,
    long: resources,
    default: DEFAULT_RESOURCES
  define_flag force : Bool,
    description: "Copy the namspace even the destination already exists."

  define_argument from, description: "The namespace to copy resources from", required: true
  define_argument to, description: "The namespace to copy resources to", required: true

  def cluster_name
    flags.cluster
  end<commit_msg>fix copy resources<commit_after>require "admiral"
require "./concerns/*"

class Psykube::Commands::CopyNamespace < Admiral::Command
  DEFAULT_RESOURCES = "cm,secrets,deploy,pvc,svc"
  # DEFAULT_RESOURCES = "cm,ds,secrets,deploy,jobs,pvc,limits,rc,svc,statefulsets"

  include Kubectl
  include PsykubeFileFlag
  include KubectlContextFlag

  define_help description: "Copy one namespace to another."

  define_flag cluster, "The cluster configuration to use.", default: "default"
  define_flag resources : String,
    description: "The resource types to copy.",
    short: r,
    long: resources,
    default: DEFAULT_RESOURCES
  define_flag force : Bool,
    description: "Copy the namspace even the destination already exists."

  define_argument from, description: "The namespace to copy resources from", required: true
  define_argument to, description: "The namespace to copy resources to", required: true

  def cluster_name
    flags.cluster
  end
{'fraction_non_alphanumeric': 0.08319827120475419, 'fraction_numerical': 0.0, 'mean_word_length': 5.03257328990228, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5375446', 'n_tokens_mistral': 550, 'n_tokens_neox': 510, 'n_words': 171}