Skip to content
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

[artifactory] feat: copy service account support from #696 #940

Closed
wants to merge 13 commits into from

Conversation

jasondamour
Copy link

@jasondamour jasondamour commented Jun 11, 2020

PR Checklist

[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]

  • Chart Version bumped
  • CHANGELOG.md updated
  • Variables and other changes are documented in the README.md
  • Title of the PR starts with chart name (e.g. [artifactory])

What this PR does / why we need it:
Copying work from artifactory-ha to artifactory #696 to support google service account authentication

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #304

Special notes for your reviewer:
Is there any process to keep charts up to date? A common chart that all variant charts should inherit? Maintaining 2+ charts for the same application seems incredibly tedious

stable/artifactory/values.yaml Outdated Show resolved Hide resolved
stable/artifactory/Chart.yaml Outdated Show resolved Hide resolved
@chukka
Copy link
Collaborator

chukka commented Jun 12, 2020

@jdamour98 Thanks for contribution ! Can you please rebase and update PR (bumping chart versions in chart.yaml & CHANGELOG.md) ?

stable/artifactory/Chart.yaml Outdated Show resolved Hide resolved
stable/artifactory/README.md Outdated Show resolved Hide resolved
stable/artifactory/README.md Show resolved Hide resolved
stable/artifactory/README.md Outdated Show resolved Hide resolved
stable/artifactory/README.md Outdated Show resolved Hide resolved
stable/artifactory/templates/artifactory-statefulset.yaml Outdated Show resolved Hide resolved
stable/artifactory/CHANGELOG.md Outdated Show resolved Hide resolved
@chukka
Copy link
Collaborator

chukka commented Jun 18, 2020

@jdamour98 Thanks for contribution - Can you please address review comments and rebase the PR ?

Copy link
Collaborator

@JfrogPrasanna JfrogPrasanna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@chukka
Copy link
Collaborator

chukka commented Jun 30, 2020

@jdamour98 Gentle Reminder !

@chukka
Copy link
Collaborator

chukka commented Jul 9, 2020

@jdamour98 Thanks for contribution - Can you please address review comments and rebase the PR ?

@jasondamour
Copy link
Author

@danielezer @eldada Sorry its been a while. added comments and changes

@jasondamour
Copy link
Author

I can't get this working myself. Pretty much anything i try results in

2020-08-13T07:55:28.948Z �[1;32m[jfrt ]�[0;39m �[1;31m[ERROR]�[0;39m [9c7672c769188260] [ctoryContextConfigListener:116] [art-init ] - Application could not be initialized: Missing identity field in config

java.lang.reflect.InvocationTargetException: null 
...
Missing identity field in config

My values.yaml (relevant block):

  persistence:
    type: google-storage
    googleStorage:
      httpsOnly: false
      bucketExists: true
      bucketName: "xxxxxxxxxxxxxxx"
      gcpServiceAccount:
        enabled: true
        customSecretName: artifactory
      path: "artifactory/filestore"

The file exists on the pod:

~ kubectl exec -it artifactory-artifactory-0 bash
Defaulting container name to artifactory.

$ cat /artifactory_bootstrap/gcp.credentials.json
{
  "type": "service_account",
  "project_id": "xxxxxxxxx",
  "private_key_id": "xxxxxxxxxxx",
  "private_key": "xxxxxxxxxxxx",
  "client_email": "xxxxxxxxxxxxxx",
  "client_id": "xxxxxxxxxxxxxxxxxxxxxxxxx",
  "auth_uri": "xxxxxxxxxxxxxxxxxxxxxxxx",
  "token_uri": "xxxxxxxxxxxxxxxxxxx",
  "auth_provider_x509_cert_url": "xxxxxxxxxxxxxxxxxxxxxxxx",
  "client_x509_cert_url": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}

LivenessProbe is failing with 503. I'm also seeing this error in the application logs, but I don't think its the root cause:

Error: Error starting application Failed pinging artifactory for 180Request failed with status code 404 at createError (/opt/jfrog/artifactory/app/frontend/bin/server/dist/node_modules/axios/lib/core/createError.js:16:15) at settle (/opt/jfrog/artifactory/app/frontend/bin/server/dist/node_modules/axios/lib/core/settle.js:17:12) at IncomingMessage.handleStreamEnd (/opt/jfrog/artifactory/app/frontend/bin/server/dist/node_modules/axios/lib/adapters/http.js:236:11) at IncomingMessage.emit (events.js:203:15) at endReadableNT (_stream_readable.js:1145:12) at process._tickCallback (internal/process/next_tick.js:63:19)

@chukka chukka requested a review from eldada August 13, 2020 08:07
@chukka
Copy link
Collaborator

chukka commented Aug 13, 2020

@jdamour98 can you please rebase one more time and fix conflicts ?

@jasondamour
Copy link
Author

@chukka Done

@jasondamour
Copy link
Author

@eldada will this change work with the default image docker.bintray.io/jfrog/artifactory-pro:7.5.5?

@jasondamour
Copy link
Author

I tested the same chart and service account with the legacy HMAC keys, which worked for google cloud storage. So this change for service accounts does not work yet. I need some help understanding why. Is this a license issue (I'm using a Pro trial license)?

Additionally, even after using HMAC keys successfully, the pod is crashing with

Error: Error starting application Failed pinging artifactory for 180Request failed with status code 404 
at createError (/opt/jfrog/artifactory/app/frontend/bin/server/dist/node_modules/axios/lib/core/createError.js:16:15) 
at settle (/opt/jfrog/artifactory/app/frontend/bin/server/dist/node_modules/axios/lib/core/settle.js:17:12) 
at IncomingMessage.handleStreamEnd (/opt/jfrog/artifactory/app/frontend/bin/server/dist/node_modules/axios/lib/adapters/http.js:236:11) 
at IncomingMessage.emit (events.js:203:15) at endReadableNT (_stream_readable.js:1145:12) at process._tickCallback (internal/process/next_tick.js:63:19)

I found only one issue referencing this, but its unhelpful: https://www.jfrog.com/jira/browse/RTFACT-22104

Can anybody clarify what connection is being attempted?

@gitta-jfrog
Copy link
Collaborator

gitta-jfrog commented Aug 4, 2024

According to my knowledge this already implemented. Thanks for your contribution. https://github.com/jfrog/charts/blob/master/stable/artifactory/values.yaml#L785

@gitta-jfrog gitta-jfrog closed this Aug 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GCS buckets integration via service account
6 participants