--- # Custom Headlamp values for static plugin installation # This disables the plugin manager and uses an init container instead # Disable the plugin manager sidecar pluginsManager: enabled: false # Use an init container to install plugins to /headlamp/static-plugins initContainers: - name: install-plugins image: node:lts-alpine command: - /bin/sh - -c - | set -e echo "Installing plugins to /headlamp/static-plugins..." # Create plugins directory mkdir -p /headlamp/static-plugins # Set up npm cache export NPM_CONFIG_CACHE=/tmp/npm-cache export NPM_CONFIG_USERCONFIG=/tmp/npm-userconfig mkdir -p /tmp/npm-cache /tmp/npm-userconfig # Install polaris plugin echo "Installing polaris plugin..." cd /headlamp/static-plugins npm pack headlamp-polaris-plugin@0.3.0 tar -xzf headlamp-polaris-plugin-0.3.0.tgz mv package headlamp-polaris-plugin rm headlamp-polaris-plugin-0.3.0.tgz # Install other plugins npx --yes @headlamp-k8s/plugin@latest install \ --source https://artifacthub.io/packages/headlamp/headlamp-plugins/headlamp_flux \ --folderName /headlamp/static-plugins npx --yes @headlamp-k8s/plugin@latest install \ --source https://artifacthub.io/packages/headlamp/headlamp-trivy/headlamp_trivy \ --folderName /headlamp/static-plugins npx --yes @headlamp-k8s/plugin@latest install \ --source https://artifacthub.io/packages/headlamp/headlamp-plugins/headlamp_cert-manager \ --folderName /headlamp/static-plugins npx --yes @headlamp-k8s/plugin@latest install \ --source https://artifacthub.io/packages/headlamp/headlamp-plugins/headlamp_ai_assistant \ --folderName /headlamp/static-plugins echo "All plugins installed successfully" ls -la /headlamp/static-plugins securityContext: runAsUser: 100 runAsGroup: 101 runAsNonRoot: true privileged: false resources: requests: cpu: 100m memory: 256Mi limits: memory: 512Mi volumeMounts: - name: static-plugins mountPath: /headlamp/static-plugins # Configure headlamp to use static plugins config: pluginsDir: /headlamp/static-plugins # Add volume for static plugins volumes: - name: static-plugins emptyDir: {} # Add volume mount to main container volumeMounts: - name: static-plugins mountPath: /headlamp/static-plugins readOnly: true