fix/existing-bugs #1

Merged
litelotus merged 7 commits from fix/existing-bugs into main 2026-05-28 10:07:18 +00:00
Owner
No description provided.
- ingress.go: initialize annotation maps with make() instead of var (nil map write panic)
- ingress.go: attach converted paths to HTTP rule spec (paths were computed but discarded)
- ingress_resource_path.go: rename GetPrefix() to GetPathType() to satisfy ToolkitIngressPath interface
- service.go: handle error from GetPulumiServicePortArray() before using result
- longhorn.go: initialize annotation map with make(), add nil check for opt.Annotations
- deployment.go: remove unused imports from empty stub
Longhorn no longer supports PVC annotations for volume configuration.
Replace with a proper StorageClass-based approach:

- Remove longhorn.go (annotation-based volume config)
- Add longhorn_storage_class.go: ToolkitLonghornStorageClass with parameters
  for replicas, data locality, encryption, fsType, migratable, stale timeout,
  and recurring job selectors (backup/snapshot schedules)
- Add pvc.go: generic ToolkitPersistentVolumeClaim that references a StorageClass
- Add storage_size.go: shared StorageSize type

StorageClass defaults to reclaimPolicy=Retain and allowVolumeExpansion=true.
- pods/deployment.go: ToolkitDeploymentOptions with auto-generated selectors,
  multi-container support, init containers, env (pulumi.StringInput values),
  envFrom (inject all keys from secret/configmap), volume mounts, resource
  limits, command/args overrides. Volumes are auto-deduced from mount sources.
- pods/mount.go: MountSource interface + Mount struct. Any toolkit resource
  (PVC, Secret, ConfigMap) that implements MountableVolumeName/Type can be
  mounted with just a path.
- core/configmap.go: ToolkitConfigMapOptions with pulumi.StringMapInput data.
- core/secret.go: ToolkitSecretOptions with pulumi.StringMapInput data,
  configurable type, satisfies MountSource.
- volumes/pvc.go: CreatedToolkitPersistentVolumeClaim now satisfies MountSource.

All inputs that could come from other Pulumi resources accept StringInput/
StringMapInput rather than plain strings.
- core/bao_secret.go: ToolkitBaoSecretOptions with path, role, template,
  file permission, and post-render command. Satisfies MountSource with
  type 'bao'. No Pulumi resource created — just a reference handle.
- pods/deployment.go: detects bao-type mounts, generates vault.hashicorp.com
  agent-inject annotations on the pod template instead of volumes/mounts.
  Supports multiple bao secrets per pod, custom templates, file paths,
  permissions, and post-render commands.

Usage:
  baoSecret := core.NewBaoSecret(core.ToolkitBaoSecretOptions{
      Name: "env",
      Path: "hermes-agent/data/env",
      Role: "hermes-agent",
  })
  // Then in deployment containers:
  Mounts: []pods.Mount{{Source: baoSecret, Path: "/vault/secrets/env"}}
litelotus deleted branch fix/existing-bugs 2026-05-28 10:08:55 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
homelab/kubernetes-toolkit!1
No description provided.