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-ha][Helm][EKS][Fargate] PVs/PVCs created from EFS drives do not automatically get their base directory structure created #1740

Closed
IBDO opened this issue Mar 22, 2023 · 1 comment

Comments

@IBDO
Copy link

IBDO commented Mar 22, 2023

Feature or Bug
We are not sure. This was unexpected behavior from our perspective, but we did have to do some work we thought could be easily automated and we think it may be a bug that it is not.

Version of Helm and Kubernetes:
Helm: v3.9.0
EKS version: 1.24

Which chart:
artifactory-ha - v7.55.6

Which product license (Enterprise/Pro/oss):
Enterprise

What happened:
EKS Fargate does not support EBS volumes. To get statefulsets to work, we need to preprovision EFS drives as persistent volumes with persistent volume claims.

The PVCs mount just fine but the init pods error out about not being able to access certain directories. Running the following set of commands creates the needed directories with the proper permissions:

sudo mount -t efs -o tls fs-<efs filesystem id>:/ efs
mkdir -p efs/etc/artifactory/
mkdir -p efs/etc/access/keys/
mkdir -p efs/bootstrap/access/etc/security/
mkdir -p efs/var
mkdir -p efs/app
chown 1030:1030 efs/ -R
sudo umount efs

After creating the above directories with the above permissions, the pods spin up just fine.

What you expected to happen:
We expected the pod to create these directories with the proper permissions if they did not exist. These EFS drives were empty so nothing should have obstructed them from doing so.

How to reproduce it (as minimally and precisely as possible):
0) Create an EKS Fargate cluster. EKS with nodegroups can provision EBS volumes, EKS Fargate cannot.

  1. Create EFSs drives for the pods in AWS.
  2. Create PVs for the EFS drives like so:
apiVersion: v1
kind: PersistentVolume
metadata:
  name: <pv name goes here>
spec:
  capacity:
    storage: 200Gi
  volumeMode: Filesystem
  accessModes:
    - ReadWriteOnce
  persistentVolumeReclaimPolicy: Retain
  storageClassName: efs-sc
  csi:
    driver: efs.csi.aws.com
    volumeHandle: <efs id goes here>
  1. Create PVCs for the EFS drives like so:
kubeapiVersion: v1
kind: PersistentVolumeClaim
metadata:
  labels:
    app: artifactory-ha
    release: artifactory-ha
    role: artifactory-ha-artifactory-ha-primary
  name: volume-artifactory-ha-artifactory-ha-primary-0
spec:
  accessModes:
  - ReadWriteOnce
  resources:
    requests:
      storage: 200Gi
  storageClassName: efs-sc
  volumeMode: Filesystem
  volumeName: <pv name goes here>
  1. Install the helm chart, and the pods should stall on init
  2. To fix the issue, run the above commands to create the directories. The pods should spin up.

Anything else we need to know:
We met with the Technical Account Manager and asked whether this was a bug. They said it may or may not be.

@gitta-jfrog
Copy link
Collaborator

JFrog Artifactory does not officially support EKS Fargate.

@gitta-jfrog gitta-jfrog closed this as not planned Won't fix, can't repro, duplicate, stale Dec 20, 2023
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

No branches or pull requests

2 participants