-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: handle semver dependencies (#515)
- Loading branch information
Showing
6 changed files
with
306 additions
and
6 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
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 |
---|---|---|
|
@@ -9,6 +9,7 @@ | |
"dependencies": { | ||
"decompress": "^4.2.1", | ||
"fs-extra": "^11.1.1", | ||
"semver": "^7.6.3", | ||
"~common": "workspace:^" | ||
} | ||
} |
251 changes: 251 additions & 0 deletions
251
packages/kontinuous/tests/__snapshots__/helm-dependencies-with-not-fixed-version.dev.yaml
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,251 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`test build manifests with snapshots helm-dependencies-with-not-fixed-version.dev 1`] = ` | ||
"apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: release-name-postgresql | ||
namespace: default | ||
labels: | ||
app.kubernetes.io/instance: release-name | ||
app.kubernetes.io/managed-by: Helm | ||
app.kubernetes.io/name: postgresql | ||
app.kubernetes.io/version: 16.1.0 | ||
helm.sh/chart: postgresql-13.4.4 | ||
annotations: | ||
kontinuous/chartPath: project.postgresql | ||
kontinuous/source: project/charts/postgresql/templates/serviceaccount.yaml | ||
automountServiceAccountToken: false | ||
--- | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: release-name-postgresql | ||
namespace: default | ||
labels: | ||
app.kubernetes.io/instance: release-name | ||
app.kubernetes.io/managed-by: Helm | ||
app.kubernetes.io/name: postgresql | ||
app.kubernetes.io/version: 16.1.0 | ||
helm.sh/chart: postgresql-13.4.4 | ||
annotations: | ||
kontinuous/chartPath: project.postgresql | ||
kontinuous/source: project/charts/postgresql/templates/secrets.yaml | ||
type: Opaque | ||
data: | ||
postgres-password: MTIzNA== | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: release-name-postgresql-hl | ||
namespace: default | ||
labels: | ||
app.kubernetes.io/instance: release-name | ||
app.kubernetes.io/managed-by: Helm | ||
app.kubernetes.io/name: postgresql | ||
app.kubernetes.io/version: 16.1.0 | ||
helm.sh/chart: postgresql-13.4.4 | ||
app.kubernetes.io/component: primary | ||
annotations: | ||
service.alpha.kubernetes.io/tolerate-unready-endpoints: \\"true\\" | ||
kontinuous/chartPath: project.postgresql | ||
kontinuous/source: project/charts/postgresql/templates/primary/svc-headless.yaml | ||
spec: | ||
type: ClusterIP | ||
clusterIP: None | ||
publishNotReadyAddresses: true | ||
ports: | ||
- name: tcp-postgresql | ||
port: 5432 | ||
targetPort: tcp-postgresql | ||
selector: | ||
app.kubernetes.io/instance: release-name | ||
app.kubernetes.io/name: postgresql | ||
app.kubernetes.io/component: primary | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: release-name-postgresql | ||
namespace: default | ||
labels: | ||
app.kubernetes.io/instance: release-name | ||
app.kubernetes.io/managed-by: Helm | ||
app.kubernetes.io/name: postgresql | ||
app.kubernetes.io/version: 16.1.0 | ||
helm.sh/chart: postgresql-13.4.4 | ||
app.kubernetes.io/component: primary | ||
annotations: | ||
kontinuous/chartPath: project.postgresql | ||
kontinuous/source: project/charts/postgresql/templates/primary/svc.yaml | ||
spec: | ||
type: ClusterIP | ||
sessionAffinity: None | ||
ports: | ||
- name: tcp-postgresql | ||
port: 5432 | ||
targetPort: tcp-postgresql | ||
selector: | ||
app.kubernetes.io/instance: release-name | ||
app.kubernetes.io/name: postgresql | ||
app.kubernetes.io/component: primary | ||
--- | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: release-name-postgresql | ||
namespace: default | ||
labels: | ||
app.kubernetes.io/instance: release-name | ||
app.kubernetes.io/managed-by: Helm | ||
app.kubernetes.io/name: postgresql | ||
app.kubernetes.io/version: 16.1.0 | ||
helm.sh/chart: postgresql-13.4.4 | ||
app.kubernetes.io/component: primary | ||
annotations: | ||
kontinuous/chartPath: project.postgresql | ||
kontinuous/source: project/charts/postgresql/templates/primary/statefulset.yaml | ||
spec: | ||
replicas: 1 | ||
serviceName: release-name-postgresql-hl | ||
updateStrategy: | ||
rollingUpdate: {} | ||
type: RollingUpdate | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/instance: release-name | ||
app.kubernetes.io/name: postgresql | ||
app.kubernetes.io/component: primary | ||
template: | ||
metadata: | ||
name: release-name-postgresql | ||
labels: | ||
app.kubernetes.io/instance: release-name | ||
app.kubernetes.io/managed-by: Helm | ||
app.kubernetes.io/name: postgresql | ||
app.kubernetes.io/version: 16.1.0 | ||
helm.sh/chart: postgresql-13.4.4 | ||
app.kubernetes.io/component: primary | ||
spec: | ||
serviceAccountName: release-name-postgresql | ||
automountServiceAccountToken: false | ||
affinity: | ||
podAntiAffinity: | ||
preferredDuringSchedulingIgnoredDuringExecution: | ||
- podAffinityTerm: | ||
labelSelector: | ||
matchLabels: | ||
app.kubernetes.io/instance: release-name | ||
app.kubernetes.io/name: postgresql | ||
app.kubernetes.io/component: primary | ||
topologyKey: kubernetes.io/hostname | ||
weight: 1 | ||
securityContext: | ||
fsGroup: 1001 | ||
fsGroupChangePolicy: Always | ||
supplementalGroups: [] | ||
sysctls: [] | ||
hostNetwork: false | ||
hostIPC: false | ||
containers: | ||
- name: postgresql | ||
image: docker.io/bitnami/postgresql:16.1.0-debian-11-r25 | ||
imagePullPolicy: IfNotPresent | ||
securityContext: | ||
allowPrivilegeEscalation: false | ||
capabilities: | ||
drop: | ||
- ALL | ||
privileged: false | ||
readOnlyRootFilesystem: false | ||
runAsNonRoot: true | ||
runAsUser: 1001 | ||
seccompProfile: | ||
type: RuntimeDefault | ||
env: | ||
- name: BITNAMI_DEBUG | ||
value: \\"false\\" | ||
- name: POSTGRESQL_PORT_NUMBER | ||
value: \\"5432\\" | ||
- name: POSTGRESQL_VOLUME_DIR | ||
value: /bitnami/postgresql | ||
- name: PGDATA | ||
value: /bitnami/postgresql/data | ||
- name: POSTGRES_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
name: release-name-postgresql | ||
key: postgres-password | ||
- name: POSTGRESQL_ENABLE_LDAP | ||
value: \\"no\\" | ||
- name: POSTGRESQL_ENABLE_TLS | ||
value: \\"no\\" | ||
- name: POSTGRESQL_LOG_HOSTNAME | ||
value: \\"false\\" | ||
- name: POSTGRESQL_LOG_CONNECTIONS | ||
value: \\"false\\" | ||
- name: POSTGRESQL_LOG_DISCONNECTIONS | ||
value: \\"false\\" | ||
- name: POSTGRESQL_PGAUDIT_LOG_CATALOG | ||
value: \\"off\\" | ||
- name: POSTGRESQL_CLIENT_MIN_MESSAGES | ||
value: error | ||
- name: POSTGRESQL_SHARED_PRELOAD_LIBRARIES | ||
value: pgaudit | ||
ports: | ||
- name: tcp-postgresql | ||
containerPort: 5432 | ||
livenessProbe: | ||
failureThreshold: 6 | ||
initialDelaySeconds: 30 | ||
periodSeconds: 10 | ||
successThreshold: 1 | ||
timeoutSeconds: 5 | ||
exec: | ||
command: | ||
- /bin/sh | ||
- -c | ||
- exec pg_isready -U \\"postgres\\" -h 127.0.0.1 -p 5432 | ||
readinessProbe: | ||
failureThreshold: 6 | ||
initialDelaySeconds: 5 | ||
periodSeconds: 10 | ||
successThreshold: 1 | ||
timeoutSeconds: 5 | ||
exec: | ||
command: | ||
- /bin/sh | ||
- -c | ||
- -e | ||
- > | ||
exec pg_isready -U \\"postgres\\" -h 127.0.0.1 -p 5432 | ||
[ -f /opt/bitnami/postgresql/tmp/.initialized ] || [ -f /bitnami/postgresql/.initialized ] | ||
resources: | ||
limits: {} | ||
requests: | ||
cpu: 250m | ||
memory: 256Mi | ||
volumeMounts: | ||
- name: dshm | ||
mountPath: /dev/shm | ||
- name: data | ||
mountPath: /bitnami/postgresql | ||
volumes: | ||
- name: dshm | ||
emptyDir: | ||
medium: Memory | ||
volumeClaimTemplates: | ||
- apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: data | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 8Gi | ||
" | ||
`; |
7 changes: 7 additions & 0 deletions
7
packages/kontinuous/tests/samples/helm-dependencies-with-not-fixed-version/Chart.yaml
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,7 @@ | ||
apiVersion: v2 | ||
name: postgresql | ||
version: 0.0.0 | ||
dependencies: | ||
- name: postgresql | ||
repository: https://charts.bitnami.com/bitnami | ||
version: ^13.0.0 |
5 changes: 5 additions & 0 deletions
5
packages/kontinuous/tests/samples/helm-dependencies-with-not-fixed-version/values.yaml
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,5 @@ | ||
global: | ||
postgresql: | ||
auth: | ||
password: "1234" | ||
postgresPassword: "1234" |
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