Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
syntassodev committed Jul 13, 2023
2 parents 2cde779 + 0372062 commit 6943c53
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 10 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ __debug_bin

# Generated by make distribution - contains pointers to images
distribution/kratix.yaml
charts/kratix/crds/platform_kratix_io_crds.yaml
charts/kratix/templates/distribution.yaml

# Generated by .goreleaser.yml - contains binaries released to GitHub
Expand Down
4 changes: 2 additions & 2 deletions charts/kratix/templates/distribution.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ metadata:
---
apiVersion: v1
data:
WC_IMG: syntasso/kratix-platform-pipeline-adapter:9929c0652d4e6778f3c4220f51ca02fa0df3c9b8
WC_IMG: syntasso/kratix-platform-pipeline-adapter:0372062c21fbdaa138e2b70b44802d55d3354625
kind: ConfigMap
metadata:
name: kratix-platform-wc-img-config
Expand Down Expand Up @@ -388,7 +388,7 @@ spec:
configMapKeyRef:
key: WC_IMG
name: kratix-platform-wc-img-config
image: syntasso/kratix-platform:9929c0652d4e6778f3c4220f51ca02fa0df3c9b8
image: syntasso/kratix-platform:0372062c21fbdaa138e2b70b44802d55d3354625
livenessProbe:
httpGet:
path: /healthz
Expand Down
2 changes: 1 addition & 1 deletion config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ configMapGenerator:
images:
- name: controller
newName: syntasso/kratix-platform
newTag: 9929c0652d4e6778f3c4220f51ca02fa0df3c9b8
newTag: 0372062c21fbdaa138e2b70b44802d55d3354625
4 changes: 2 additions & 2 deletions distribution/kratix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@ metadata:
---
apiVersion: v1
data:
WC_IMG: syntasso/kratix-platform-pipeline-adapter:9929c0652d4e6778f3c4220f51ca02fa0df3c9b8
WC_IMG: syntasso/kratix-platform-pipeline-adapter:0372062c21fbdaa138e2b70b44802d55d3354625
kind: ConfigMap
metadata:
name: kratix-platform-wc-img-config
Expand Down Expand Up @@ -823,7 +823,7 @@ spec:
configMapKeyRef:
key: WC_IMG
name: kratix-platform-wc-img-config
image: syntasso/kratix-platform:9929c0652d4e6778f3c4220f51ca02fa0df3c9b8
image: syntasso/kratix-platform:0372062c21fbdaa138e2b70b44802d55d3354625
livenessProbe:
httpGet:
path: /healthz
Expand Down
4 changes: 2 additions & 2 deletions distribution/single-cluster/install-all-in-one.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@ metadata:
---
apiVersion: v1
data:
WC_IMG: syntasso/kratix-platform-pipeline-adapter:9929c0652d4e6778f3c4220f51ca02fa0df3c9b8
WC_IMG: syntasso/kratix-platform-pipeline-adapter:0372062c21fbdaa138e2b70b44802d55d3354625
kind: ConfigMap
metadata:
name: kratix-platform-wc-img-config
Expand Down Expand Up @@ -823,7 +823,7 @@ spec:
configMapKeyRef:
key: WC_IMG
name: kratix-platform-wc-img-config
image: syntasso/kratix-platform:9929c0652d4e6778f3c4220f51ca02fa0df3c9b8
image: syntasso/kratix-platform:0372062c21fbdaa138e2b70b44802d55d3354625
livenessProbe:
httpGet:
path: /healthz
Expand Down
8 changes: 8 additions & 0 deletions lib/pipeline/configure.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import (
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
)

const kratixConfigureOperation = "configure"

func NewConfigurePipeline(rr *unstructured.Unstructured, pipelines []platformv1alpha1.Pipeline, resourceRequestIdentifier, promiseIdentifier string) v1.Pod {
volumes := metadataAndSchedulingVolumes(promiseIdentifier)

Expand Down Expand Up @@ -79,6 +81,12 @@ func configurePipelineInitContainers(rr *unstructured.Unstructured, pipelines []
{Name: "vol" + strconv.Itoa(i), MountPath: "/input"},
{Name: "vol" + strconv.Itoa(i+1), MountPath: "/output"},
},
Env: []v1.EnvVar{
{
Name: kratixOperationEnvVar,
Value: kratixConfigureOperation,
},
},
})
}
}
Expand Down
6 changes: 4 additions & 2 deletions lib/pipeline/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import (
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
)

const kratixDeleteOperation = "delete"

func NewDeletePipeline(rr *unstructured.Unstructured, pipelines []platformv1alpha1.Pipeline, resourceRequestIdentifier, promiseIdentifier string) v1.Pod {
containers, pipelineVolumes := deletePipelineContainers(rr, pipelines, resourceRequestIdentifier)

Expand Down Expand Up @@ -56,8 +58,8 @@ func deletePipelineContainers(rr *unstructured.Unstructured, pipelines []platfor
},
Env: []v1.EnvVar{
{
Name: "KRATIX_OPERATION",
Value: "delete",
Name: kratixOperationEnvVar,
Value: kratixDeleteOperation,
},
},
})
Expand Down
2 changes: 2 additions & 0 deletions lib/pipeline/shared.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import (
"k8s.io/apimachinery/pkg/util/uuid"
)

const kratixOperationEnvVar = "KRATIX_OPERATION"

func readerContainerAndVolume(rr *unstructured.Unstructured) (v1.Container, v1.Volume) {
resourceKindNameNamespace := fmt.Sprintf("%s.%s %s --namespace %s",
strings.ToLower(rr.GetKind()), rr.GroupVersionKind().Group, rr.GetName(), rr.GetNamespace())
Expand Down

0 comments on commit 6943c53

Please sign in to comment.