-
Notifications
You must be signed in to change notification settings - Fork 243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds support for exec command for odo deploy #6047
Conversation
✅ Deploy Preview for odo-docusaurus-preview ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
The problem I am facing with the code in this PR is that if you do below, it adds a helm repo and also creates a helm release: $ kubectl run helm --image quay.io/dharmit/fedora:helm --command -- helm repo add bitnami https://charts.bitnami.com/bitnami && helm install my-db bitnami/postgresql But when using following devfile, and doing devfile.yamlschemaVersion: 2.2.0
metadata:
description: Stack with Node.js 16
displayName: Node.js Runtime
icon: https://nodejs.org/static/images/logos/nodejs-new-pantone-black.svg
language: javascript
name: my-nodejs-app
projectType: nodejs
tags:
- NodeJS
- Express
- ubi8
version: 2.0.0
components:
- container:
endpoints:
- name: port-8080-tcp
protocol: tcp
targetPort: 8080
image: registry.access.redhat.com/ubi8/nodejs-16:latest
memoryLimit: 1024Mi
mountSources: true
name: runtime
- container:
image: quay.io/quay/busybox
name: funtime
- container:
image: quay.io/dharmit/fedora:helm
name: tools
commands:
- exec:
commandLine: npm install
component: runtime
group:
isDefault: true
kind: build
workingDir: ${PROJECT_SOURCE}
id: install
- exec:
commandLine: npm start
component: runtime
group:
isDefault: true
kind: run
workingDir: ${PROJECT_SOURCE}
id: run
- exec:
commandLine: ls -la
component: funtime
id: mycmdone
- exec:
commandLine: echo "Sleeping 5 seconds"; sleep 5
component: funtime
id: mycmdtwo
- exec:
commandLine: helm repo add bitnami https://charts.bitnami.com/bitnami && helm install my-db bitnami/postgresql
component: tools
id: deploy-db
- composite:
commands:
- mycmdone
- mycmdtwo
- deploy-db
group:
kind: deploy
isDefault: true
id: mydeploy Here's the error I see from the Pod created for the Job: $ kubectl logs toolsgk5d7-5g5pt
"bitnami" has been added to your repositories
Error: template: postgresql/templates/secrets.yaml:17:24: executing "postgresql/templates/secrets.yaml" at <include "common.secrets.passwords.manage" (dict "secret" (include "common.names.fullname" .) "key" "postgres-password" "providedValues" (list "global.postgresql.auth.postgresPassword" "auth.postgresPassword") "context" $)>: error calling include: template: postgresql/charts/common/templates/_secrets.tpl:93:20: executing "common.secrets.passwords.manage" at <lookup "v1" "Secret" $.context.Release.Namespace .secret>: error calling lookup: secrets "my-db-postgresql" is forbidden: User "system:serviceaccount:myproject:default" cannot get resource "secrets" in API group "" in the namespace "myproject" |
@dharmit: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
Signed-off-by: Dharmit Shah <shahdharmit@gmail.com>
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
@dharmit: PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Signed-off-by: Dharmit Shah shahdharmit@gmail.com
What type of PR is this:
/kind feature
What does this PR do / why we need it:
Which issue(s) this PR fixes:
Fixes #5701
PR acceptance criteria:
Unit test
Integration test
Documentation
How to test changes / Special notes to the reviewer: