Comments (7)
im not sure i understand what error you are encountering. len(...) > 0
and ... != ""
is the same thing. how does your App CR look like?
from kapp-controller.
Ya sorry, I was not very clear. For this app CR
apiVersion: kappctrl.k14s.io/v1alpha1
kind: App
metadata:
name: ds-tools-jupyterhub
namespace: default
spec:
serviceAccountName: cluster-admin-sa
fetch:
- image:
# Docker image url; unqualified, tagged, or
# digest references supported (required)
url: docker/image
# secret with auth details (optional)
secretRef:
name: auth
subPath: ds-tools/jupyterhub
template:
- ytt:
ignoreUnknownComments: true
strict: false
deploy:
- kapp: {}
The len
condition evaluates to true, even though no GenericOpt is set. This leads to the kapp cmd environment containing KAPP_KUBECONFIG_YAML="", which leads to the kapp deploy exiting with something like mapping values are not allowed in this context
. This does not happen when using the 0.6 version.
from kapp-controller.
could you include full error message you see in status section?
from kapp-controller.
kind: App
apiVersion: kappctrl.k14s.io/v1alpha1
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: >
{"apiVersion":"kappctrl.k14s.io/v1alpha1","kind":"App","metadata":{"annotations":{},"name":"ds-tools-jupyterhub","namespace":"default"},"spec":{"deploy":[{"kapp":{}}],"fetch":[{"image":{"secretRef":{"name":"auth"},"subPath":"ds-tools/jupyterhub","url":"docker/image:master.1ef0f8a30ca6d4323d5e7436eae61cc93a466188"}}],"serviceAccountName":"cluster-admin-sa","template":[{"ytt":{"ignoreUnknownComments":true,"strict":false}}]}}
creationTimestamp: '2020-08-06T13:39:02Z'
finalizers:
- finalizers.kapp-ctrl.k14s.io/delete
generation: 2
managedFields:
- apiVersion: kappctrl.k14s.io/v1alpha1
fieldsType: FieldsV1
fieldsV1:
'f:metadata':
'f:annotations':
.: {}
'f:kubectl.kubernetes.io/last-applied-configuration': {}
'f:spec':
.: {}
'f:deploy': {}
'f:fetch': {}
'f:serviceAccountName': {}
manager: kubectl
operation: Update
time: '2020-08-06T13:39:02Z'
- apiVersion: kappctrl.k14s.io/v1alpha1
fieldsType: FieldsV1
fieldsV1:
'f:metadata':
'f:finalizers': {}
'f:spec':
'f:template': {}
'f:status':
.: {}
'f:conditions': {}
'f:deploy':
.: {}
'f:error': {}
'f:exitCode': {}
'f:finished': {}
'f:startedAt': {}
'f:stderr': {}
'f:updatedAt': {}
'f:fetch':
.: {}
'f:exitCode': {}
'f:startedAt': {}
'f:updatedAt': {}
'f:friendlyDescription': {}
'f:inspect':
.: {}
'f:error': {}
'f:exitCode': {}
'f:stderr': {}
'f:updatedAt': {}
'f:observedGeneration': {}
'f:template':
.: {}
'f:exitCode': {}
'f:updatedAt': {}
manager: __debug_bin
operation: Update
time: '2020-08-06T13:40:36Z'
name: ds-tools-jupyterhub
namespace: default
resourceVersion: '19018'
selfLink: /apis/kappctrl.k14s.io/v1alpha1/namespaces/default/apps/ds-tools-jupyterhub
uid: f6079c24-3ff5-4745-a356-9f31a634951b
spec:
deploy:
- kapp: {}
fetch:
- image:
secretRef:
name: auth
subPath: ds-tools/jupyterhub
url: >-
docker/image:master.1ef0f8a30ca6d4323d5e7436eae61cc93a466188
serviceAccountName: cluster-admin-sa
template:
- ytt:
ignoreUnknownComments: true
status:
conditions:
- message: 'Deploying: exit status 1'
status: 'True'
type: ReconcileFailed
deploy:
error: 'Deploying: exit status 1'
exitCode: 1
finished: true
startedAt: '2020-08-06T13:40:25Z'
stderr: 'kapp: Error: yaml: line 8: mapping values are not allowed in this context'
updatedAt: '2020-08-06T13:40:36Z'
fetch:
exitCode: 0
startedAt: '2020-08-06T13:40:23Z'
updatedAt: '2020-08-06T13:40:24Z'
friendlyDescription: 'Reconcile failed: Deploying: exit status 1'
inspect:
error: 'Inspecting: exit status 1'
exitCode: 1
stderr: 'kapp: Error: yaml: line 8: mapping values are not allowed in this context'
updatedAt: '2020-08-06T13:40:36Z'
observedGeneration: 2
template:
exitCode: 0
updatedAt: '2020-08-06T13:40:25Z'
from kapp-controller.
hmm interesting, i dont think it's being set to empty because error message kapp: Error: yaml: line 8: mapping values are not allowed in this context
says line 8, so there is definitely some yaml. since you are using spec.serviceAccountName kapp-controller uses this template for building kuebconfig: https://github.com/k14s/kapp-controller/blob/develop/pkg/deploy/service_accounts.go#L77-L97. closes to line 8 is ca certificate interpolation, but that's base64 encoded...
The len condition evaluates to true, even though no GenericOpt is set.
that's not possible. if there is no genericopt then genericopt.KubeconfigYAML would be empty which would not make len evaluate to true.
did you modify kapp-controller in some way? if yes, could you print generated kubeconfig yaml before its sent to kapp? is it a valid yaml? im not seeing yet how you are ending up with invalid yaml.
from kapp-controller.
(happy to zoom to debug as well if you want, just pop into our #k14s channel in Kubernetes slack)
from kapp-controller.
Thanks for the support. I was testing in a k3s cluster and after a teardown and reinit the error vanished
from kapp-controller.
Related Issues (20)
- Optional ability to check if client has permissions to perform CRUD actions before trying them HOT 4
- `kctrl package install … --dry-run` logs "Succeeded" to stdout HOT 2
- `kctrl package install … --dry-run --ytt-overlay-file …` does not stamp out overlays HOT 1
- Unblock app deletion by falling back to noop when safe
- pull the kapp-controller continer image with tag equal to release HOT 2
- Ensure noop delete due to terminating namespaces takes into account that a namespace might have been terminated already
- Cannot release repository with build metadata HOT 2
- Support image pull cache for App CR to archieve 'imagePullPolicy: IfNotPresent' HOT 14
- Support exposing the status of individual resources applied on cluster HOT 3
- Make kapp controller extensible HOT 3
- Make bits of kctrl more configurable
- kctrl kubernetesVersionSelection constraint
- MetaPackage capability HOT 5
- 53: server misbehaving HOT 9
- `kctrl`: values with an empty object default in Helm get the string `"{}"` as a default in OpenAPI
- Add support for tag constraints when adding a package repo with kctrl HOT 1
- Seeking clarification on PackageInstall values. HOT 2
- `kctrl`: Helm array values with an empty default should still get an `items` field in their OpenAPI schema
- Set seccompProfile to ensure that deployment is successful on PSA enforced cluster.
- `kctrl` hangs when deleting package repository
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kapp-controller.