-
-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
introduce snapshot testing for the chart
- Loading branch information
1 parent
e70d38a
commit 101325d
Showing
9 changed files
with
615 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.PHONY: install-chartsnap snapshots update-snapshots | ||
install-chartsnap: | ||
helm plugin install https://github.com/jlandowner/helm-chartsnap | ||
|
||
snapshot: | ||
helm chartsnap -c ../ -f . | ||
|
||
update-snapshot: | ||
helm chartsnap -c ../ -f . -u |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,159 @@ | ||
# chartsnap: snapshot_version=v3 | ||
--- | ||
# Source: ollama/templates/serviceaccount.yaml | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: chartsnap-ollama | ||
namespace: default | ||
labels: | ||
helm.sh/chart: ollama-1.4.1 | ||
app.kubernetes.io/name: ollama | ||
app.kubernetes.io/instance: chartsnap | ||
app.kubernetes.io/version: "0.5.7" | ||
app.kubernetes.io/managed-by: Helm | ||
automountServiceAccountToken: true | ||
--- | ||
# Source: ollama/templates/service.yaml | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: chartsnap-ollama | ||
namespace: default | ||
labels: | ||
helm.sh/chart: ollama-1.4.1 | ||
app.kubernetes.io/name: ollama | ||
app.kubernetes.io/instance: chartsnap | ||
app.kubernetes.io/version: "0.5.7" | ||
app.kubernetes.io/managed-by: Helm | ||
spec: | ||
type: ClusterIP | ||
ports: | ||
- port: 11434 | ||
targetPort: http | ||
protocol: TCP | ||
name: http | ||
selector: | ||
app.kubernetes.io/name: ollama | ||
app.kubernetes.io/instance: chartsnap | ||
--- | ||
# Source: ollama/templates/deployment.yaml | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: chartsnap-ollama | ||
namespace: default | ||
labels: | ||
helm.sh/chart: ollama-1.4.1 | ||
app.kubernetes.io/name: ollama | ||
app.kubernetes.io/instance: chartsnap | ||
app.kubernetes.io/version: "0.5.7" | ||
app.kubernetes.io/managed-by: Helm | ||
spec: | ||
replicas: 1 | ||
strategy: | ||
type: Recreate | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: ollama | ||
app.kubernetes.io/instance: chartsnap | ||
template: | ||
metadata: | ||
labels: | ||
helm.sh/chart: ollama-1.4.1 | ||
app.kubernetes.io/name: ollama | ||
app.kubernetes.io/instance: chartsnap | ||
app.kubernetes.io/version: "0.5.7" | ||
app.kubernetes.io/managed-by: Helm | ||
spec: | ||
serviceAccountName: chartsnap-ollama | ||
securityContext: {} | ||
containers: | ||
- name: ollama | ||
securityContext: {} | ||
image: "ollama/ollama:0.5.7" | ||
imagePullPolicy: IfNotPresent | ||
ports: | ||
- name: http | ||
containerPort: 11434 | ||
protocol: TCP | ||
env: | ||
envFrom: | ||
args: | ||
resources: | ||
limits: {} | ||
requests: {} | ||
volumeMounts: | ||
- name: ollama-data | ||
mountPath: /root/.ollama | ||
livenessProbe: | ||
httpGet: | ||
path: / | ||
port: http | ||
initialDelaySeconds: 60 | ||
periodSeconds: 10 | ||
timeoutSeconds: 5 | ||
successThreshold: 1 | ||
failureThreshold: 6 | ||
readinessProbe: | ||
httpGet: | ||
path: / | ||
port: http | ||
initialDelaySeconds: 30 | ||
periodSeconds: 5 | ||
timeoutSeconds: 3 | ||
successThreshold: 1 | ||
failureThreshold: 6 | ||
volumes: | ||
- name: ollama-data | ||
emptyDir: {} | ||
--- | ||
# Source: ollama/templates/ingress.yaml | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: chartsnap-ollama | ||
namespace: default | ||
labels: | ||
helm.sh/chart: ollama-1.4.1 | ||
app.kubernetes.io/name: ollama | ||
app.kubernetes.io/instance: chartsnap | ||
app.kubernetes.io/version: "0.5.7" | ||
app.kubernetes.io/managed-by: Helm | ||
annotations: | ||
alb.ingress.kubernetes.io/group.name: ollama | ||
spec: | ||
ingressClassName: alb | ||
rules: | ||
- host: "otwld.github.io" | ||
http: | ||
paths: | ||
- path: / | ||
pathType: Prefix | ||
backend: | ||
service: | ||
name: chartsnap-ollama | ||
port: | ||
number: 11434 | ||
--- | ||
# Source: ollama/templates/tests/test-connection.yaml | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: "chartsnap-ollama-test-connection" | ||
namespace: default | ||
labels: | ||
helm.sh/chart: ollama-1.4.1 | ||
app.kubernetes.io/name: ollama | ||
app.kubernetes.io/instance: chartsnap | ||
app.kubernetes.io/version: "0.5.7" | ||
app.kubernetes.io/managed-by: Helm | ||
annotations: | ||
"helm.sh/hook": test | ||
spec: | ||
containers: | ||
- name: wget | ||
image: busybox | ||
command: ['wget'] | ||
args: ['chartsnap-ollama:11434'] | ||
restartPolicy: Never |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
# chartsnap: snapshot_version=v3 | ||
--- | ||
# Source: ollama/templates/serviceaccount.yaml | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: chartsnap-ollama | ||
namespace: default | ||
labels: | ||
helm.sh/chart: ollama-1.4.1 | ||
app.kubernetes.io/name: ollama | ||
app.kubernetes.io/instance: chartsnap | ||
app.kubernetes.io/version: "0.5.7" | ||
app.kubernetes.io/managed-by: Helm | ||
automountServiceAccountToken: true | ||
--- | ||
# Source: ollama/templates/service.yaml | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: chartsnap-ollama | ||
namespace: default | ||
labels: | ||
helm.sh/chart: ollama-1.4.1 | ||
app.kubernetes.io/name: ollama | ||
app.kubernetes.io/instance: chartsnap | ||
app.kubernetes.io/version: "0.5.7" | ||
app.kubernetes.io/managed-by: Helm | ||
spec: | ||
type: ClusterIP | ||
ports: | ||
- port: 11434 | ||
targetPort: http | ||
protocol: TCP | ||
name: http | ||
selector: | ||
app.kubernetes.io/name: ollama | ||
app.kubernetes.io/instance: chartsnap | ||
--- | ||
# Source: ollama/templates/deployment.yaml | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: chartsnap-ollama | ||
namespace: default | ||
labels: | ||
helm.sh/chart: ollama-1.4.1 | ||
app.kubernetes.io/name: ollama | ||
app.kubernetes.io/instance: chartsnap | ||
app.kubernetes.io/version: "0.5.7" | ||
app.kubernetes.io/managed-by: Helm | ||
spec: | ||
replicas: 1 | ||
strategy: | ||
type: Recreate | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: ollama | ||
app.kubernetes.io/instance: chartsnap | ||
template: | ||
metadata: | ||
labels: | ||
helm.sh/chart: ollama-1.4.1 | ||
app.kubernetes.io/name: ollama | ||
app.kubernetes.io/instance: chartsnap | ||
app.kubernetes.io/version: "0.5.7" | ||
app.kubernetes.io/managed-by: Helm | ||
spec: | ||
serviceAccountName: chartsnap-ollama | ||
securityContext: {} | ||
containers: | ||
- name: ollama | ||
securityContext: {} | ||
image: "ollama/ollama:0.5.7" | ||
imagePullPolicy: IfNotPresent | ||
ports: | ||
- name: http | ||
containerPort: 11434 | ||
protocol: TCP | ||
env: | ||
envFrom: | ||
args: | ||
resources: | ||
limits: {} | ||
requests: {} | ||
volumeMounts: | ||
- name: ollama-data | ||
mountPath: /root/.ollama | ||
livenessProbe: | ||
httpGet: | ||
path: / | ||
port: http | ||
initialDelaySeconds: 60 | ||
periodSeconds: 10 | ||
timeoutSeconds: 5 | ||
successThreshold: 1 | ||
failureThreshold: 6 | ||
readinessProbe: | ||
httpGet: | ||
path: / | ||
port: http | ||
initialDelaySeconds: 30 | ||
periodSeconds: 5 | ||
timeoutSeconds: 3 | ||
successThreshold: 1 | ||
failureThreshold: 6 | ||
lifecycle: | ||
postStart: | ||
exec: | ||
command: | ||
- /bin/sh | ||
- -c | ||
- "while ! /bin/ollama ps > /dev/null 2>&1; do\n sleep 5\ndone\necho \"moondream\" | xargs -n1 /bin/ollama pull \necho \"moondream\" | xargs -n1 /bin/ollama run\n" | ||
volumes: | ||
- name: ollama-data | ||
emptyDir: {} | ||
--- | ||
# Source: ollama/templates/tests/test-connection.yaml | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: "chartsnap-ollama-test-connection" | ||
namespace: default | ||
labels: | ||
helm.sh/chart: ollama-1.4.1 | ||
app.kubernetes.io/name: ollama | ||
app.kubernetes.io/instance: chartsnap | ||
app.kubernetes.io/version: "0.5.7" | ||
app.kubernetes.io/managed-by: Helm | ||
annotations: | ||
"helm.sh/hook": test | ||
spec: | ||
containers: | ||
- name: wget | ||
image: busybox | ||
command: ['wget'] | ||
args: ['chartsnap-ollama:11434'] | ||
restartPolicy: Never |
Oops, something went wrong.