# Copyright (c) 2026 VirtRigaud Creators
# SPDX-License-Identifier: Apache-2.0

# Proxmox VE credentials secret for VirtRigaud
#
# The Proxmox provider reads credentials from files mounted at:
#   /etc/virtrigaud/credentials/token_id
#   /etc/virtrigaud/credentials/token_secret
#   /etc/virtrigaud/credentials/username
#   /etc/virtrigaud/credentials/password
#
# Do NOT use envFrom: secretRef for Proxmox credentials.
# That pattern is not implemented; the provider only reads from the file paths above.
#
# A Provider whose VirtualMachines carry spec.userData (since v0.4.1: the provider builds
# a NoCloud seed on the PVE node over SSH) and a VMMigration to or from a Proxmox
# provider also need the SSH credentials of the PVE node, as further keys in the same
# Secret: ssh_user (must be root; root is the default), ssh_privatekey or ssh_password,
# and known_hosts (required: no trust on first use, ADR-0004). genisoimage and flock
# must be installed on the node. See migration/vsphere-to-proxmox.yaml.
#
# API token authentication (recommended):
apiVersion: v1
kind: Secret
metadata:
  name: proxmox-creds
  namespace: default
type: Opaque
stringData:
  # API token: USER@REALM!TOKENID format
  token_id: "virtrigaud@pve!vrtg-token"
  token_secret: "xxxxxxxx-xxxx-4xxx-xxxx-xxxxxxxxxxxx"
  #
  # SSH data plane (for VMs with user-data, and for migration):
  # ssh_user: "root"
  # ssh_privatekey: |
  #   -----BEGIN OPENSSH PRIVATE KEY-----
  #   ...
  # known_hosts: "pve.example.com ssh-ed25519 AAAA..."   # ssh-keyscan from a trusted host

---
# Username/password authentication (less secure):
apiVersion: v1
kind: Secret
metadata:
  name: proxmox-creds-userpass
  namespace: default
type: Opaque
stringData:
  username: "virtrigaud@pve"
  password: "REDACTED"
