This message was deleted.
# fleet
a
This message was deleted.
q
@freezing-holiday-13112 I think that the slash can be escaped with "~1". Can you try with something like this?
{"spec":{"selector":{"<http://app.kubernetes.io|app.kubernetes.io>~1instance":"k8s-dotnet-template","<http://app.kubernetes.io|app.kubernetes.io>~1name":"k8s-dotnet-template"}}}
f
@quick-sandwich-76600 thank you for that idea. It still didn't work but it was worth trying
Here's what I ended up putting in my fleet.yaml
Copy code
- apiVersion: v1
     kind: Service
     name: k8s-dotnet-template
     namespace: k8s-dotnet-template
     operations:
     - {"op": "remove", "path": "/spec/selector/app.kubernetes.io~1instance/k8s-dotnet-template"}
     - {"op": "remove", "path": "/spec/selector/app.kubernetes.io~1name/k8s-dotnet-template"}
But it didn't work
q
Ok, sorry it didn't work. Can you share the full fleet.yaml so I understand better the structure?
f
Copy code
defaultNamespace: k8s-dotnet-template
helm:
  releaseName: k8s-dotnet-template
  chart: k8s-dotnet-template
  repo: <https://itools.dev.company.com/artifactory/helm-local>
  version: 1.01.44-app-paths
  values:

    image:
      repository: <http://docker-local.itools.dev.company.com/com.company/k8s-dotnet-template|docker-local.itools.dev.company.com/com.company/k8s-dotnet-template>

diff:
  comparePatches:
  - apiVersion: apps/v1
    kind: Deployment
    name: k8s-dotnet-template
    namespace: k8s-dotnet-template
    operations:
    - {"op": "remove", "path": "/spec/replicas/"}
  - apiVersion: v1
    kind: Service
    name: k8s-dotnet-template
    namespace: k8s-dotnet-template
    operations:
    - {"op": "remove", "path": "/spec/selector/app.kubernetes.io~1instance/k8s-dotnet-template"}
    - {"op": "remove", "path": "/spec/selector/app.kubernetes.io~1name/k8s-dotnet-template"}

targetCustomizations:
- name: dev
  helm:
    values:
      resources:
        limits:
          cpu: 250m
          memory: 256Mi
        requests:
          cpu: 100m
          memory: 128Mi

      appEnv: "dev"
      virtualService:
        hostProjectName: dotnet-projects
        hostDNS: "<http://company.com|company.com>"
      autoscaling:
        enabled: false
        minReplicas: 3
        maxReplicas: 8

      secrets:
        enabled: true
        dbAppPass: "password"
        platformtoken: "token"
        pfxCertPass: "password"

      simpleBlueGreenRelease:
        enabled: true
        skipAnalysis: false

      istio:
        enabled: true
        tls:
          mode: DISABLE

  clusterSelector:
    matchLabels:
      env: dev-1

- name: pqa
  helm:
    values:
      resources:
        limits:
          cpu: 250m
          memory: 256Mi
        requests:
          cpu: 100m
          memory: 128Mi

      appEnv: "pqa"
      virtualService:
        hostProjectName: dotnet-projects
        hostDNS: "<http://company.com|company.com>"
      autoscaling:
        enabled: false
        minReplicas: 3
        maxReplicas: 8

      secrets:
        enabled: true
        dbAppPass: "password"
        platformtoken: "token"
        pfxCertPass: "password"

      simpleBlueGreenRelease:
        enabled: true
        skipAnalysis: false

      istio:
        enabled: true
        tls:
          mode: DISABLE

  clusterSelector:
    matchLabels:
      env: pqa-1
Thanks for looking at this @quick-sandwich-76600
q
@freezing-holiday-13112 the problem seems to be the fact that the value itself should not be included in the path. I think this version should work for you:
defaultNamespace: k8s-dotnet-template
helm:
releaseName: k8s-dotnet-template
chart: k8s-dotnet-template
repo: <https://itools.dev.company.com/artifactory/helm-local>
version: 1.01.44-app-paths
values:
image:
repository: <http://docker-local.itools.dev.company.com/com.company/k8s-dotnet-template|docker-local.itools.dev.company.com/com.company/k8s-dotnet-template>
diff:
comparePatches:
- apiVersion: apps/v1
kind: Deployment
name: k8s-dotnet-template
namespace: k8s-dotnet-template
operations:
- {"op": "remove", "path": "/spec/replicas/"}
- apiVersion: v1
kind: Service
name: k8s-dotnet-template
namespace: k8s-dotnet-template
operations:
- {"op": "remove", "path": "/spec/selector/app.kubernetes.io/instance"}
- {"op": "remove", "path": "/spec/selector/app.kubernetes.io/name"}
targetCustomizations:
- name: dev
helm:
values:
resources:
limits:
cpu: 250m
memory: 256Mi
requests:
cpu: 100m
memory: 128Mi
appEnv: "dev"
virtualService:
hostProjectName: dotnet-projects
hostDNS: "<http://company.com|company.com>"
autoscaling:
enabled: false
minReplicas: 3
maxReplicas: 8
secrets:
enabled: true
dbAppPass: "password"
platformtoken: "token"
pfxCertPass: "password"
simpleBlueGreenRelease:
enabled: true
skipAnalysis: false
istio:
enabled: true
tls:
mode: DISABLE
clusterSelector:
matchLabels:
env: dev-1
- name: pqa
helm:
values:
resources:
limits:
cpu: 250m
memory: 256Mi
requests:
cpu: 100m
memory: 128Mi
appEnv: "pqa"
virtualService:
hostProjectName: dotnet-projects
hostDNS: "<http://company.com|company.com>"
autoscaling:
enabled: false
minReplicas: 3
maxReplicas: 8
secrets:
enabled: true
dbAppPass: "password"
platformtoken: "token"
pfxCertPass: "password"
simpleBlueGreenRelease:
enabled: true
skipAnalysis: false
istio:
enabled: true
tls:
mode: DISABLE
clusterSelector:
matchLabels:
env: pqa-1
f
that was a path I initially tried. Tried again but it failed.
Thank you for detailing this some more I appreciate it
q
I'm sorry it didn't work. I've run out of ideas. Sending it to the channel again as maybe somebody else is able to see what may be wrong.