Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
syntassodev committed Aug 24, 2023
2 parents 1708a90 + d94ba3c commit 1a83263
Show file tree
Hide file tree
Showing 13 changed files with 13 additions and 28 deletions.
2 changes: 1 addition & 1 deletion api/v1alpha1/work_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func (w *Work) GetSchedulingSelectors() map[string]string {
type Workload struct {
// +optional
Filepath string `json:"filepath,omitempty"`
Content []byte `json:"content,omitempty"`
Content string `json:"content,omitempty"`
}

//+kubebuilder:object:root=true
Expand Down
9 changes: 1 addition & 8 deletions api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions charts/kratix/crds/platform_kratix_io_crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,6 @@ spec:
description: Workload represents the manifest workload to be deployed on destination
properties:
content:
format: byte
type: string
filepath:
type: string
Expand Down Expand Up @@ -392,7 +391,6 @@ spec:
description: Workload represents the manifest workload to be deployed on destination
properties:
content:
format: byte
type: string
filepath:
type: string
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 @@ -349,7 +349,7 @@ metadata:
---
apiVersion: v1
data:
WC_IMG: syntasso/kratix-platform-pipeline-adapter:b3e46e2874b588be34c42e218defe2eff97634b9
WC_IMG: syntasso/kratix-platform-pipeline-adapter:d94ba3c7b4ea68e010631ccfea4e611beb881e87
kind: ConfigMap
metadata:
name: kratix-platform-wc-img-config
Expand Down Expand Up @@ -410,7 +410,7 @@ spec:
configMapKeyRef:
key: WC_IMG
name: kratix-platform-wc-img-config
image: syntasso/kratix-platform:b3e46e2874b588be34c42e218defe2eff97634b9
image: syntasso/kratix-platform:d94ba3c7b4ea68e010631ccfea4e611beb881e87
livenessProbe:
httpGet:
path: /healthz
Expand Down
1 change: 0 additions & 1 deletion config/crd/bases/platform.kratix.io_workplacements.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ spec:
on destination
properties:
content:
format: byte
type: string
filepath:
type: string
Expand Down
1 change: 0 additions & 1 deletion config/crd/bases/platform.kratix.io_works.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ spec:
on destination
properties:
content:
format: byte
type: string
filepath:
type: string
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: b3e46e2874b588be34c42e218defe2eff97634b9
newTag: d94ba3c7b4ea68e010631ccfea4e611beb881e87
2 changes: 1 addition & 1 deletion controllers/promise_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ func (r *PromiseReconciler) createWorkResourceForDependencies(ctx context.Contex

work.Spec.Workloads = []v1alpha1.Workload{
{
Content: yamlBytes,
Content: string(yamlBytes),
Filepath: "static/dependencies.yaml",
},
}
Expand Down
2 changes: 1 addition & 1 deletion controllers/workplacement_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func (r *WorkPlacementReconciler) deleteWorkPlacement(ctx context.Context, write
func (r *WorkPlacementReconciler) writeWorkloadsToStateStore(writer writers.StateStoreWriter, workPlacement v1alpha1.WorkPlacement, logger logr.Logger) error {
for _, workload := range workPlacement.Spec.Workloads {
filepath := filepath.Join(getDir(workPlacement), workload.Filepath)
err := writer.WriteObject(filepath, workload.Content)
err := writer.WriteObject(filepath, []byte(workload.Content))
if err != nil {
logger.Error(err, "Error writing resources to repository", "filepath", filepath)
return err
Expand Down
6 changes: 2 additions & 4 deletions distribution/kratix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,6 @@ spec:
on destination
properties:
content:
format: byte
type: string
filepath:
type: string
Expand Down Expand Up @@ -446,7 +445,6 @@ spec:
on destination
properties:
content:
format: byte
type: string
filepath:
type: string
Expand Down Expand Up @@ -806,7 +804,7 @@ metadata:
---
apiVersion: v1
data:
WC_IMG: syntasso/kratix-platform-pipeline-adapter:b3e46e2874b588be34c42e218defe2eff97634b9
WC_IMG: syntasso/kratix-platform-pipeline-adapter:d94ba3c7b4ea68e010631ccfea4e611beb881e87
kind: ConfigMap
metadata:
name: kratix-platform-wc-img-config
Expand Down Expand Up @@ -867,7 +865,7 @@ spec:
configMapKeyRef:
key: WC_IMG
name: kratix-platform-wc-img-config
image: syntasso/kratix-platform:b3e46e2874b588be34c42e218defe2eff97634b9
image: syntasso/kratix-platform:d94ba3c7b4ea68e010631ccfea4e611beb881e87
livenessProbe:
httpGet:
path: /healthz
Expand Down
6 changes: 2 additions & 4 deletions distribution/single-cluster/install-all-in-one.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,6 @@ spec:
on destination
properties:
content:
format: byte
type: string
filepath:
type: string
Expand Down Expand Up @@ -446,7 +445,6 @@ spec:
on destination
properties:
content:
format: byte
type: string
filepath:
type: string
Expand Down Expand Up @@ -806,7 +804,7 @@ metadata:
---
apiVersion: v1
data:
WC_IMG: syntasso/kratix-platform-pipeline-adapter:b3e46e2874b588be34c42e218defe2eff97634b9
WC_IMG: syntasso/kratix-platform-pipeline-adapter:d94ba3c7b4ea68e010631ccfea4e611beb881e87
kind: ConfigMap
metadata:
name: kratix-platform-wc-img-config
Expand Down Expand Up @@ -867,7 +865,7 @@ spec:
configMapKeyRef:
key: WC_IMG
name: kratix-platform-wc-img-config
image: syntasso/kratix-platform:b3e46e2874b588be34c42e218defe2eff97634b9
image: syntasso/kratix-platform:d94ba3c7b4ea68e010631ccfea4e611beb881e87
livenessProbe:
httpGet:
path: /healthz
Expand Down
2 changes: 1 addition & 1 deletion work-creator/pipeline/work_creator.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func (w *WorkCreator) getWorkloadsFromDir(prefixToTrimFromWorkloadFilepath, root
}

workload := platformv1alpha1.Workload{
Content: byteValue,
Content: string(byteValue),
Filepath: path,
}

Expand Down
2 changes: 1 addition & 1 deletion work-creator/pipeline/work_creator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ var _ = Describe("WorkCreator", func() {
for _, workload := range workResource.Spec.Workloads {
fileContent, err := ioutil.ReadFile(filepath.Join(mockPipelineDirectory, "input", workload.Filepath))
Expect(err).NotTo(HaveOccurred())
Expect(workload.Content).To(Equal(fileContent))
Expect(workload.Content).To(Equal(string(fileContent)))
}
})
})
Expand Down

0 comments on commit 1a83263

Please sign in to comment.