-
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.
fix tests and ensure entity annotations are used
- Loading branch information
Showing
19 changed files
with
260 additions
and
70 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
15 changes: 15 additions & 0 deletions
15
examples/scaffolder/SparkAppArgoWorkflow/templates/ArgoWorkflowsManifest/catalog-info.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,15 @@ | ||
--- | ||
apiVersion: backstage.io/v1alpha1 | ||
kind: Component | ||
metadata: | ||
name: ${{values.name | dump}} | ||
annotations: | ||
backstage.io/kubernetes-id: "${{values.clusterName}}" | ||
apache-spark/cluster-name: "${{values.clusterName}}" | ||
argo-workflows/cluster-name: "${{values.clusterName}}" | ||
backstage.io/kubernetes-namespace: "${{values.namespace}}" | ||
backstage.io/kubernetes-label-selector: "backstage.io/component-id=${{values.name}}" | ||
spec: | ||
type: job | ||
lifecycle: experimental | ||
owner: ${{ values.owner | default('guest')}} |
43 changes: 43 additions & 0 deletions
43
examples/scaffolder/SparkAppArgoWorkflow/templates/ArgoWorkflowsManifest/manifest.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,43 @@ | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Workflow | ||
metadata: | ||
name: "spark-${{values.name}}" | ||
namespace: "${{values.namespace}}" | ||
labels: | ||
backstage.io/component-id: "${{values.name}}" | ||
spec: | ||
arguments: {} | ||
entrypoint: demo-workflow | ||
serviceAccountName: argo-workflows | ||
workflowMetadata: | ||
labels: | ||
backstage.io/component-id: "${{values.name}}" | ||
templates: | ||
- name: demo-workflow | ||
steps: | ||
- - name: prepare-resources | ||
template: prepare-resources | ||
- - name: run-sparkapp | ||
template: run-sparkapp | ||
- - name: cleanup-resources | ||
template: cleanup-resources | ||
- name: notify-users | ||
template: cleanup-resources | ||
- name: prepare-resources | ||
container: | ||
image: docker/whalesay | ||
command: [ sleep ] | ||
args: [ "10" ] | ||
- name: run-sparkapp | ||
resource: | ||
action: create | ||
setOwnerReference: true | ||
successCondition: status.applicationState.state == COMPLETED | ||
failureCondition: status.applicationState.state in (FAILED, ERROR) | ||
manifest: | | ||
${{values.manifest | dump}} | ||
- name: cleanup-resources | ||
container: | ||
image: docker/whalesay | ||
command: [ sleep ] | ||
args: [ "5" ] |
8 changes: 8 additions & 0 deletions
8
examples/scaffolder/SparkAppArgoWorkflow/templates/SparkManifest/merge.json
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,8 @@ | ||
{ | ||
"metadata": { | ||
"namespace": "${{values.namespace}}", | ||
"labels": { | ||
"backstage.io/component-id": "${{values.name}}" | ||
} | ||
} | ||
} |
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
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,60 @@ | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Workflow | ||
metadata: | ||
name: spark-operator | ||
namespace: default | ||
spec: | ||
arguments: {} | ||
entrypoint: demo-workflow | ||
serviceAccountName: argo-workflows | ||
templates: | ||
- name: demo-workflow | ||
steps: | ||
- - name: sleep | ||
template: sleep | ||
- - name: spark-operator | ||
template: sparkapp | ||
- name: sleep | ||
container: | ||
image: docker/whalesay | ||
command: [ sleep ] | ||
args: [ "60" ] | ||
- name: sparkapp | ||
resource: | ||
action: create | ||
setOwnerReference: true | ||
successCondition: status.applicationState.state == COMPLETED | ||
failureCondition: status.applicationState.state in (FAILED, ERROR) | ||
manifest: | | ||
apiVersion: "sparkoperator.k8s.io/v1beta2" | ||
kind: SparkApplication | ||
metadata: | ||
generateName: pyspark-pi- | ||
namespace: default | ||
spec: | ||
type: Python | ||
pythonVersion: "3" | ||
mode: cluster | ||
image: "public.ecr.aws/r1l5w1y9/spark-operator:3.2.1-hadoop-3.3.1-java-11-scala-2.12-python-3.8-latest" | ||
mainApplicationFile: "local:///opt/spark/examples/src/main/python/pi.py" | ||
sparkVersion: "3.1.1" | ||
restartPolicy: | ||
type: OnFailure | ||
onFailureRetries: 1 | ||
onFailureRetryInterval: 10 | ||
onSubmissionFailureRetries: 1 | ||
onSubmissionFailureRetryInterval: 20 | ||
driver: | ||
cores: 1 | ||
coreLimit: "1200m" | ||
memory: "512m" | ||
labels: | ||
version: 3.1.1 | ||
serviceAccount: spark | ||
executor: | ||
cores: 1 | ||
instances: 2 | ||
memory: "512m" | ||
serviceAccount: spark | ||
labels: | ||
version: 3.1.1 |
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
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
Oops, something went wrong.