mammoth-memory-36508
08/25/2023, 8:31 PMambitious-plastic-3551
08/25/2023, 9:56 PMambitious-plastic-3551
08/25/2023, 9:56 PMambitious-plastic-3551
08/25/2023, 9:56 PMminiature-lock-53926
09/01/2023, 7:18 AMmost-kite-870
09/05/2023, 12:38 AMpolite-salesmen-18131
09/05/2023, 10:49 AMkustomize:
dir: ./kustomize
But it seems that is not working. The job never gets deleted after :
"<http://helm.sh/hook-delete-policy|helm.sh/hook-delete-policy>": hook-succeeded
Is this suppose to work from fleet?
If yes can you provide an example please.average-waitress-96027
09/06/2023, 11:16 AMsprig
if possible and do :
targetCustomizations:
- name: local
clusterSelector:
matchLabels:
provider: local
helm:
values:
host: "${if .ClusterLabels.env=="qa"} value ${else} other_value ${end}"
Meaning if a label ( e.g. .ClusterLabels.env
) has a specific value and set a helm value:
host:"${if .ClusterLabels.env=="qa"} value ${else} other_value ${end}"
busy-room-152
09/07/2023, 9:24 AMdazzling-spring-42724
09/08/2023, 2:04 PMfleet.yaml
file and it works, right? Can I do it other way? For example, I’d send an webhook event when the image is built, put the tag in the event body and make Fleet catch is somehow, is it possible?dazzling-spring-42724
09/08/2023, 2:04 PMhigh-garden-3471
09/15/2023, 7:41 PMfew-jordan-3349
09/20/2023, 1:01 PM# All labels on Rancher clusters are available using global.fleet.clusterLabels.LABELNAME
# These can now be accessed directly as variables
# The variable's value will be an empty string if the referenced cluster label does not
# exist on the targeted cluster
variableName: global.fleet.clusterLabels.LABELNAME
is it possible to also use Node labels?
the elemental node labels would be perfect for my helm deployment as i would need the serial number, which is already provided automatically as label to the node
machineInventoryLabels:
machineUUID: ${System Information/UUID}
manufacturer: ${System Information/Manufacturer}
productName: ${System Information/Product Name}
serialNumber: ${System Information/Serial Number}
ambitious-plastic-3551
09/20/2023, 1:27 PMambitious-plastic-3551
09/20/2023, 1:28 PMnice-monkey-75335
09/25/2023, 7:47 AM<http://kustomize.toolkit.fluxcd.io/prune|kustomize.toolkit.fluxcd.io/prune>: disabled
to do this - is there a fleet equivalent? I don't want to enable this for the entire GitRepo - only for some resources.ambitious-plastic-3551
09/25/2023, 8:12 AMcalm-memory-91006
09/27/2023, 6:50 AMambitious-plastic-3551
09/28/2023, 8:43 AMambitious-plastic-3551
09/28/2023, 8:46 AMambitious-plastic-3551
09/28/2023, 8:46 AMfaint-island-31128
09/28/2023, 3:47 PMdefaultNamespace: ns-test2
namespaceLabels:
foo: barLabel
<http://pod-security.kubernetes.io/enforce|pod-security.kubernetes.io/enforce>: restricted
<http://pod-security.kubernetes.io/enforce-version|pod-security.kubernetes.io/enforce-version>: latest
namespaceAnnotations:
foo: barAnnotation
kustomize:
dir: overlays
and then the following:
#overlays/kustomization.yaml
resources:
- ./secret.yaml
- ./namespace.yaml
and
#overlays/namespace.yaml
apiVersion: v1
kind: Namespace
metadata:
labels:
<http://pod-security.kubernetes.io/enforce|pod-security.kubernetes.io/enforce>: restricted
<http://pod-security.kubernetes.io/enforce-version|pod-security.kubernetes.io/enforce-version>: latest
name: ns-test2
and
#overlays/secret.yaml
apiVersion: v1
kind: Secret
metadata:
name: dotfile-secret
data:
.secret-file: dmFsdWUtMg0KDQo=
I would expect to see the namespace ns-test2
to get created with the pss labels, but they aren't. Instead I get the following error:
Unable to continue with install: Namespace "ns-test2" in namespace "" exists and cannot be imported into the current release: invalid ownership metadata; label validation error: missing key "<http://app.kubernetes.io/managed-by|app.kubernetes.io/managed-by>": must be set to "Helm"; annotation validation error: missing key "<http://meta.helm.sh/release-name|meta.helm.sh/release-name>": must be set to "something"; annotation validation error: missing key "<http://meta.helm.sh/release-namespace|meta.helm.sh/release-namespace>": must be set to "ns-test2"]; namespace.v1 ns-test2 missing
Note I redacted it a bit
faint-island-31128
09/28/2023, 3:55 PMfleet.yaml
.faint-island-31128
09/28/2023, 3:55 PMfleet.yaml
. This is what it looks like:
defaultNamespace: ns-test2
namespaceLabels:
foo: barLabel
namespaceAnnotations:
foo: barAnnotation
kustomize:
dir: overlays
ambitious-plastic-3551
09/28/2023, 4:13 PMambitious-plastic-3551
09/28/2023, 4:15 PMfaint-island-31128
09/28/2023, 4:35 PMInternal error occurred: failed calling webhook "rancher.cattle.io.namespaces.create-non-kubesystem": failed to call webhook: Post "<https://rancher-webhook.cattle-system.svc:443/v1/webhook/validation/namespaces?timeout=10s>": context deadline exceeded
faint-island-31128
09/28/2023, 4:55 PMErrApplied(1) [Bundle development-apps-tools-ns-test: Internal error occurred: failed calling webhook "rancher.cattle.io.namespaces.create-non-kubesystem": failed to call webhook: Post "<https://rancher-webhook.cattle-system.svc:443/v1/webhook/validation/namespaces?timeout=10s>":
faint-island-31128
09/28/2023, 5:20 PMambitious-plastic-3551
09/28/2023, 5:36 PM