Comments (12)
I would assume this is a cluster configuration issue.
A vanilla K8s cluster would not have any type of dynamic provisioner to take care of the PVCs the Helm chart will set up. Most of the "batteries included" kinds of local cluster environments (kind, minikube, Docker Desktop, etc.) come with their own provisioners to handle their specific flavour of dynamic local storage provisioning, which is why it works there with local storage but not on vanilla K8s. See https://kubernetes.io/docs/concepts/storage/storage-classes/#local
So while you can have a (default) storage class set up, if there's no provisioner taking care of creating PVs it will not work without manual intervention. Then PersistentVolume
s of appropriate size would have to be manually created before deploying APIClarity.
We had a note to this effect in the README but it got dropped when we introduced the Helm charts: b1efc08
I think the general assumption of the README is that you have a cluster set-up that has functioning dynamic storage provisioning, as this is the most likely case. Maybe we should reintroduce the note for people wanting to test this on their own local set-ups. Other than what we already do in the Helm chart there isn't much else we can do from our side to ensure persistency is handled without manual intervention in these situations.
If I have this remembered correctly two PVCs are currently created when deploying APIClarity. One for the PostgreSQL database with a default size of 8Gi
and one for APIClarity itself with a default size of 100Mi
. So creating two PVs accordingly should solve your issue.
@nckbgov let me know if this is helpful or not.
from apiclarity.
Thanks for the explanation @kaechele. I will move to dynamic storage asap. For now, I will manually add PersistentVolumes, as you suggested:
kind: PersistentVolume
apiVersion: v1
metadata:
name: apiclarity--pv
spec:
storageClassName: local-storage
capacity:
storage: 100Mi
accessModes:
- ReadWriteOnce
claimRef:
apiVersion: v1
kind: PersistentVolumeClaim
name: apiclarity-apiclarity-pvc
namespace: apiclarity
local:
path: /data/apiclarity
nodeAffinity:
required:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- node-1
persistentVolumeReclaimPolicy: Retain
volumeMode: Filesystem
kind: PersistentVolume
apiVersion: v1
metadata:
name: apiclarity-postgresql-pv
spec:
storageClassName: local-storage
capacity:
storage: 8Gi
accessModes:
- ReadWriteOnce
claimRef:
apiVersion: v1
kind: PersistentVolumeClaim
name: data-apiclarity-apiclarity-postgresql-0
namespace: apiclarity
local:
path: /data/apiclarity-postgresql
nodeAffinity:
required:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- node-1
persistentVolumeReclaimPolicy: Retain
volumeMode: Filesystem
from apiclarity.
Hi @nckbgov I think #99 should fix the issue.
You will need to set storageClass: "-"
in the values file, it will set storageClassName: ""
, which disables dynamic provisioning.
Please try to see if that helps, if not, please share the errors you see to further understand the error.
from apiclarity.
Hi @nckbgov, not sure I understand the issue here, can you please elaborate?
from apiclarity.
Hi @FrimIdan,
Of course. Let me share more info:
I have a vanilla kubernetes with only one storage type - local-storage.
I am unable to install apiclarity on this cluster. In the descriptions i see that a pv is missing.
Does the helm chart support local-storage and if it's the case, how should values.yaml be defined?
from apiclarity.
Hi @nckbgov
Does the following configuration may help? (global.persistentVolume.storageClass
)
https://github.com/apiclarity/apiclarity/blob/master/charts/apiclarity/values.yaml#L29
https://github.com/apiclarity/apiclarity/blob/master/charts/apiclarity/templates/pvc.yaml#L14-L16
from apiclarity.
No, it does not.
I tried to explicitly define the storageClass and storageClassName as local-storage.
I also tried with storageClass: "".
from apiclarity.
I am hitting an error:
$ helm install --values values.yaml --create-namespace apiclarity apiclarity/apiclarity -n apiclarity --debug
install.go:159: [debug] Original chart version: ""
install.go:176: [debug] CHART PATH: /home/ubuntu/.cache/helm/repository/apiclarity-v0.8.0.tgz
client.go:108: [debug] creating 1 resource(s)
client.go:258: [debug] Starting delete for "apiclarity-apiclarity" Service
client.go:108: [debug] creating 1 resource(s)
client.go:258: [debug] Starting delete for "apiclarity-postgresql-secret" Secret
client.go:108: [debug] creating 1 resource(s)
client.go:108: [debug] creating 6 resource(s)
Error: PersistentVolumeClaim "apiclarity-apiclarity-pvc" is invalid: spec.storageClassName: Invalid value: "-": a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')
helm.go:84: [debug] PersistentVolumeClaim "apiclarity-apiclarity-pvc" is invalid: spec.storageClassName: Invalid value: "-": a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')
I don't think i have in helm that latest update i see here:
2807756
from apiclarity.
I know, it wasn't released yet, you can clone the repo and checkout helm-pvc-fix
and run the helm install command with local charts.
helm install --values values.yaml --create-namespace apiclarity charts/apiclarity -n apiclarity --debug
from apiclarity.
Hi @nckbgov, https://github.com/apiclarity/apiclarity/releases/tag/v0.9.0 was released, you can try it by updating your helm repo (helm repo update
).
Hope it will be solved.
from apiclarity.
Hi @FrimIdan, I updated the values.yaml:
global:
[...]
persistentVolume:
storageClass: "-"
[...]
However, I still get the error:
kubectl describe pvc apiclarity-apiclarity-pvc -n apiclarit
[...]
Used By: apiclarity-apiclarity-69c944d4-xsxvt
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal FailedBinding 1s (x13 over 2m49s) persistentvolume-controller no persistent volumes available for this claim and no storage class is set
kubectl describe pod -n apiclarity apiclarity-apiclarity-69c944d4-xsxvt
[...]
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning FailedScheduling 4m41s default-scheduler 0/15 nodes are available: 15 pod has unbound immediate PersistentVolumeClaims.
from apiclarity.
@kaechele / @cantechit I remember that you guys had some issues with PVC configurations, can you see if this issue is familiar? Not sure it's an APIClarity issue more like a K8s configuration issue IMO.
from apiclarity.
Related Issues (20)
- Cannot bind volume on EKS HOT 3
- Provide better validation error message for uploaded spec
- Unable to start BFLA learning HOT 1
- When trace sampling is enabled, API event not recorded HOT 1
- BFLA Analyzer is not reporting BFLA violation HOT 1
- List shadow and zombie APIs at top-level
- Only most recent 50 events are saved in API events table HOT 1
- Simplified Deployment For Envoy/WASM Traffic Sources HOT 3
- Support for AWS API Gateway with Lambda proxy integration HOT 1
- [Question] Is there any support for Kong API Gateway for external cluster tracing?
- Add ADOPTERS.md to APIClarity HOT 1
- Building Custom OpenTelemetry Collector fails
- apiclarity-apiclarity pod can not start HOT 1
- Deployment apiclarity reports error "job failed"
- no monitored traffic on the UI HOT 2
- Kong API Gateway plugin:serviceaccount "apiclarity-apiclarity-kong-post-install-job"not found
- Horizontal scaling
- spec validation failed
- istio proxy do not started because wasm not loaded
- Issue to see reconstructed data in API clarity UI
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 apiclarity.