github randyoyarzabal/chief v3.1.1
v3.1.1 Release

latest releases: v3.14, v3.1.3, v3.1.2...
one month ago

Chief v3.1.1 Release Notes

🚀 What's New in v3.1.1

🔧 Function Naming Convention Standardization

All plugin functions now use consistent hyphen notation following the pattern chief.<plugin>_<word>-<word> for better readability and consistency across the entire codebase.

🆕 New SSL Renewal Feature

  • chief.ssl_renew-tls-cert - Smart certificate renewal with automatic parameter extraction
    • Auto-detects CA from existing certificate issuer
    • Preserves all original certificate parameters (Subject, SAN, extensions)
    • Expiry checking and validation (--check-expiry)
    • Optional backup creation (--backup)
    • New key generation support (--new-key)
    • Force renewal option (--force)

🚀 Enhanced OpenShift Login

Major enhancements to chief.oc_login for managing multiple clusters from Vault:

  • -l, --list - Interactive cluster selection with numbered menu

    • Lists all clusters from ${CHIEF_VAULT_OC_PATH}
    • Prompts user to select cluster for login
    • Works with all authentication methods (-kc, -ka, user)
  • --list-only - Non-interactive cluster listing

    • Perfect for scripting and quick reference
    • Shows all available clusters without prompting
    • Includes helpful usage examples
  • -f, --filter PATTERN - Filter clusters by patterns

    • Supports wildcards: 'ocp*', 'prod*', '*dev*'
    • Works with both interactive and non-interactive modes
    • Shows filtered vs total counts

Examples:

chief.oc_login -l                    # Interactive selection
chief.oc_login --list-only           # Just list clusters  
chief.oc_login -l -f 'ocp*'          # List only 'ocp*' clusters
chief.oc_login --list-only -f 'prod*' # List only production clusters

🆕 New OpenShift Information Function

chief.oc_whoami - Comprehensive cluster information display:

  • Current User: Shows authenticated user identity
  • API Server: Displays OpenShift API server URL
  • Console Address: Shows web console URL (if available)
  • Context: Shows current kubectl/oc context name
  • Login Validation: Confirms active authentication status

Options:

  • -q, --quiet - Minimal output (user and server only)
  • -j, --json - Machine-readable JSON output format
  • -? - Comprehensive help documentation

Examples:

chief.oc_whoami              # Full cluster information
chief.oc_whoami -q           # Minimal output  
chief.oc_whoami -j           # JSON format for scripting

JSON Output Format:

{
  "logged_in": true,
  "user": "username", 
  "server": "https://api.cluster.com:6443",
  "console": "https://console.cluster.com",
  "context": "context-name"
}

This function provides instant visibility into your current OpenShift session, perfect for scripts that need to verify cluster connectivity or for users managing multiple clusters.

🎯 Help System Standardization

Consistent Help Options across all OpenShift functions:

  • -? and --help - Both options now work identically on all functions
  • Standardized Format - All usage texts show both help options
  • Argument Parsing - All functions accept both short and long form help

Functions Updated:

  • chief.oc_get-all-objects
  • chief.oc_clean-olm
  • chief.oc_clean-replicasets
  • chief.oc_approve-csrs
  • chief.oc_show-stuck-resources
  • chief.oc_login
  • chief.oc_delete-stuck-ns
  • chief.oc_whoami

This ensures consistency across the entire plugin and follows best practices for command-line tool help systems.

🔒 Security Improvement

Kubeconfig Path Security Fix for chief.oc_login -kc:

  • Issue: Previously used /tmp/kubeconfig which could have permission conflicts between users
  • Fix: Now uses ~/.tmp/kubeconfig (user-specific temporary directory)
  • Benefits:
    • No permission conflicts between different users
    • Secure directory permissions (700) and file permissions (600)
    • User-owned files that are always removable by the owner
    • Better isolation between user sessions

🔥 BREAKING CHANGES

Function Naming Convention Standardization (34 functions renamed)
All plugin functions now use consistent hyphen notation following the pattern chief.<plugin>_<word>-<word>:

SSL Plugin (5 functions)

  • chief.ssl_create_cachief.ssl_create-ca
  • chief.ssl_create_tls_certchief.ssl_create-tls-cert
  • chief.ssl_view_certchief.ssl_view-cert
  • chief.ssl_get_certchief.ssl_get-cert
  • NEW: chief.ssl_renew-tls-cert (certificate renewal)

SSH Plugin (3 functions)

  • chief.ssh_rm_hostchief.ssh_rm-host
  • chief.ssh_get_publickeychief.ssh_get-publickey
  • chief.ssh_create_keypairchief.ssh_create-keypair

Python Plugin (4 functions)

  • chief.python_ve_depchief.python_ve-dep
  • chief.python_create_vechief.python_create-ve
  • chief.python_start_vechief.python_start-ve
  • chief.python_stop_vechief.python_stop-ve

OpenShift Plugin (6 functions + major enhancements)

  • chief.oc_get_all_objectschief.oc_get-all-objects
  • chief.oc_clean_olmchief.oc_clean-olm
  • chief.oc_clean_replicasetschief.oc_clean-replicasets
  • chief.oc_approve_csrschief.oc_approve-csrs
  • chief.oc_show_stuck_resourceschief.oc_show-stuck-resources
  • chief.oc_delete_stuck_nschief.oc_delete-stuck-ns
  • ENHANCED: chief.oc_login - Added Vault cluster management with interactive/non-interactive listing and filtering

Git Plugin (7 functions)

  • chief.git_rename_branchchief.git_rename-branch
  • chief.git_delete_tagchief.git_delete-tag
  • chief.git_delete_branchchief.git_delete-branch
  • chief.git_cred_cachechief.git_cred-cache
  • chief.git_set_urlchief.git_set-url
  • chief.git_config_userchief.git_config-user

Etc Plugin (8 functions)

  • chief.etc_create_bootusbchief.etc_create-bootusb
  • chief.etc_copy_dotfileschief.etc_copy-dotfiles
  • chief.etc_create_cipherchief.etc_create-cipher
  • chief.etc_mount_sharechief.etc_mount-share
  • chief.etc_folder_diffchief.etc_folder-diff
  • chief.etc_at_runchief.etc_at-run
  • chief.etc_isvalid_ipchief.etc_isvalid-ip
  • chief.etc_folder_syncchief.etc_folder-sync
  • chief.etc_ask_yes_or_nochief.etc_ask-yes-or-no
  • chief.type_writerchief.type-writer

AWS Plugin (2 functions)

  • chief.aws_set_rolechief.aws_set-role
  • chief.aws_export_credschief.aws_export-creds

📋 Migration Guide

Update Required: All scripts, aliases, or documentation that reference the old underscore notation must be updated to use the new hyphen notation.

Pattern: The new convention matches existing functions like chief.vault_file-edit for consistency across all plugins.

Examples:

# OLD (will not work)
chief.ssl_create_ca mycompany
chief.python_start_ve myproject
chief.oc_get_all_objects mynamespace

# NEW (correct syntax)
chief.ssl_create-ca mycompany  
chief.python_start-ve myproject
chief.oc_get-all-objects mynamespace

# NEW: Enhanced cluster management (v3.1.1)
chief.oc_login -l                    # Interactive cluster selection
chief.oc_login --list-only -f 'ocp*' # List filtered clusters

🛠️ Technical Improvements

Test Suite Enhancements

  • Fixed plugin function detection - Updated regex patterns to properly detect functions with hyphens
  • Improved test output - Suppressed unnecessary "Failed: 0" messages when all tests pass
  • Enhanced function discovery - Resolved "No functions/aliases found: vault" warnings

Documentation Updates

  • Comprehensive reference updates - All plugin summaries, examples, and cross-references updated
  • Consistent naming throughout - README.md, docs/index.md, and release notes all use new naming
  • Updated usage examples - All function calls in documentation use new hyphen convention

🔧 Post-Release Fixes (Re-release)

Completed Implementation Issues

  • Issue: Original v3.1.1 release had incomplete implementation of naming convention changes
  • Impact: chief.bash_profile, chief.bashrc, chief.profile functions were broken with "command not found" errors
  • Root Cause: Function definitions were updated but internal function calls still used old underscore naming
  • Fix Applied: Updated all missed function calls to use correct hyphen naming convention
  • Functions Restored: All shell configuration editing functions now work correctly

Remote Plugins Update Process Fixed

  • Issue: chief.plugins_update would create directory structure before validating git access, leading to orphaned directories when access failed
  • Impact: Users with invalid repository URLs or access issues would get "directory already exists" errors on subsequent attempts
  • Solution:
    • Added git access validation before any filesystem changes using git ls-remote
    • Implemented automatic backup of existing local ~/chief_plugins directories with timestamps
    • Reordered operations to validate → backup → create → clone for safer execution
  • Benefits:
    • Early failure detection prevents orphaned directories
    • Local plugin work is automatically preserved with timestamped backups
    • Clear error messages guide users to resolve access issues
    • No more "directory already exists" clone failures

Improved Warning Message Handling

  • Issue: Nagging "Remote plugins are not set to auto-update" warning appeared even when verbose output was disabled
  • Impact: Users with intentionally quiet configurations (verbose=false) still saw unwanted warnings
  • Fix Applied: Warning now respects CHIEF_CFG_VERBOSE setting and only appears when verbose output is enabled
  • Improvement: Added "Warning:" prefix to make the message less alarming and more informative

Enhanced Disconnected Installation Support

  • Issue: Local/disconnected installations (--local flag) were not properly configuring branch tracking settings
  • Impact: Disconnected installations had inconsistent configuration compared to connected installations
  • Fix Applied:
    • Disconnected installations now properly set CHIEF_CFG_UPDATE_BRANCH="main" for consistency
    • Added appropriate comments indicating the setting is ignored in disconnected mode
    • Improved user messaging to clarify disconnected installation behavior
  • Benefits:
    • Consistent configuration files between connected and disconnected installations
    • Better user experience with clearer messaging about disconnected mode
    • Proper handling of older config files that may not have branch tracking settings

Status: Released
Release Date: v3.1.1
Breaking Changes: Yes - Function naming convention (migration required)
New Features: SSL certificate renewal + Enhanced OpenShift cluster management + New oc_whoami function + Help system standardization + Security improvements

Don't miss a new chief release

NewReleases is sending notifications on new releases.