Skip to content

Missing OwnerReference for dynamically created ressoruces like poolmgr #2962

@wirehack7

Description

@wirehack7

Fission/Kubernetes version

$ fission version
client:
  fission/core:
    BuildDate: "2024-01-14T15:43:35Z"
    GitCommit: 7e8d5dd7
    Version: v1.20.1
server:
  fission/core:
    BuildDate: "2024-05-27T10:51:06Z"
    GitCommit: 0cfe08df
    Version: v1.20.2
$ kubectl version
Client Version: v1.29.1
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.28.9-eks-036c24b

Kubernetes platform (e.g. Google Kubernetes Engine)

AWS EKS

Describe the bug

Executer doesn't set OwnerReference for created ressources like PoolMgr (created kind Deploy)
As a poolmgr is created based on a env, it would be nice that the kind Deploy references the kind environment as owner.

Problem is that we use ArgoCD with HELM also for deployment of our fission functions, as the deployment of the pool manager is not child of the environment it gets marked as prune and deleted. You can set a flag to avoid the deletion, but it's still marked as prune.

To Reproduce

Create helm charts and add kind environment to the templates like that:

apiVersion: fission.io/v1
kind: Environment
metadata:
  name: nodejs
  namespace: fission
  annotations:
    argocd.argoproj.io/compare-options: IgnoreExtraneous
  labels:
    app.kubernetes.io/instance: fissionactions
spec:
  builder:
    container:
      name: ""
      resources: {}
  imagepullsecret: ""
  keeparchive: false
  poolsize: 3
  resources: {}
  runtime:
    container:
      name: ""
      resources: {}
    image: fission/node-env
  version: 1

Expected result
OwnerReference in created ressources by executer refrencing environment or function (based on execution type)

Actual result
No OwnerReference in dynamically created ressources.

Screenshots/Dump file
image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions