зеркало из https://github.com/Azure/orkestra.git
Nitishm/chore/117/sample app replace (#118)
* Reconcile successful workflow asap Fixes #109 Signed-off-by: nitishm <nitishm@microsoft.com> * Replace sample app and minor changes to support sample app closes #117 * Add example README.md Co-authored-by: nitishm <nitishm@microsoft.com>
This commit is contained in:
Родитель
3ab3f9edf6
Коммит
313df5fb19
4
Tiltfile
4
Tiltfile
|
@ -7,7 +7,7 @@ k8s_yaml(namespace_yaml("orkestra"),allow_duplicates=True)
|
|||
compile_cmd = 'CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o manager main.go'
|
||||
|
||||
local_resource(
|
||||
'azureorkestra/orkestra',
|
||||
'azure-orkestra',
|
||||
compile_cmd,
|
||||
deps=['main.go'])
|
||||
|
||||
|
@ -25,4 +25,4 @@ yaml = helm(
|
|||
|
||||
k8s_yaml(yaml,allow_duplicates=True)
|
||||
|
||||
k8s_yaml(['./config/samples/dev-applicationgroup.yaml'],allow_duplicates=True)
|
||||
k8s_yaml(['./config/samples/bookinfo.yaml'],allow_duplicates=True)
|
|
@ -0,0 +1,454 @@
|
|||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: (devel)
|
||||
creationTimestamp: null
|
||||
name: applicationgroups.orkestra.azure.microsoft.com
|
||||
spec:
|
||||
group: orkestra.azure.microsoft.com
|
||||
names:
|
||||
kind: ApplicationGroup
|
||||
listKind: ApplicationGroupList
|
||||
plural: applicationgroups
|
||||
singular: applicationgroup
|
||||
scope: Cluster
|
||||
versions:
|
||||
- additionalPrinterColumns:
|
||||
- jsonPath: .status.phase
|
||||
name: Phase
|
||||
type: string
|
||||
- jsonPath: .metadata.creationTimestamp
|
||||
name: Age
|
||||
type: date
|
||||
name: v1alpha1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: ApplicationGroup is the Schema for the applicationgroups API
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation
|
||||
of an object. Servers should convert recognized schemas to the latest
|
||||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this
|
||||
object represents. Servers may infer this from the endpoint the client
|
||||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: ApplicationGroupSpec defines the desired state of ApplicationGroup
|
||||
properties:
|
||||
applications:
|
||||
items:
|
||||
properties:
|
||||
dependencies:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
name:
|
||||
type: string
|
||||
spec:
|
||||
description: ApplicationSpec defines the desired state of Application
|
||||
properties:
|
||||
chart:
|
||||
properties:
|
||||
chartPullSecret:
|
||||
description: ChartPullSecret holds the reference to
|
||||
the authentication secret for accessing the Helm repository
|
||||
using HTTPS basic auth. NOT IMPLEMENTED!
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
git:
|
||||
description: Git URL is the URL of the Git repository,
|
||||
e.g. `git@github.com:org/repo`, `http://github.com/org/repo`,
|
||||
or `ssh://git@example.com:2222/org/repo.git`.
|
||||
type: string
|
||||
name:
|
||||
description: Name is the name of the Helm chart _without_
|
||||
an alias, e.g. redis (for `helm upgrade [flags] stable/redis`).
|
||||
type: string
|
||||
path:
|
||||
description: Path is the path to the chart relative
|
||||
to the repository root.
|
||||
type: string
|
||||
ref:
|
||||
description: Ref is the Git branch (or other reference)
|
||||
to use. Defaults to 'master', or the configured default
|
||||
Git ref.
|
||||
type: string
|
||||
repository:
|
||||
description: RepoURL is the URL of the Helm repository,
|
||||
e.g. `https://kubernetes-charts.storage.googleapis.com`
|
||||
or `https://charts.example.com`.
|
||||
type: string
|
||||
secretRef:
|
||||
description: SecretRef holds the authentication secret
|
||||
for accessing the Git repository (over HTTPS). The
|
||||
credentials will be added to an HTTPS GitURL before
|
||||
the mirror is started.
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
namespace:
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
skipDepUpdate:
|
||||
description: SkipDepUpdate will tell the operator to
|
||||
skip running 'helm dep update' before installing or
|
||||
upgrading the chart, the chart dependencies _must_
|
||||
be present for this to succeed.
|
||||
type: boolean
|
||||
version:
|
||||
description: Version is the targeted Helm chart version,
|
||||
e.g. 7.0.1.
|
||||
type: string
|
||||
type: object
|
||||
disableOpenAPIValidation:
|
||||
description: DisableOpenAPIValidation controls whether OpenAPI
|
||||
validation is enforced.
|
||||
type: boolean
|
||||
forceUpgrade:
|
||||
description: Force will mark this Helm release to `--force`
|
||||
upgrades. This forces the resource updates through delete/recreate
|
||||
if needed.
|
||||
type: boolean
|
||||
groupID:
|
||||
type: string
|
||||
helmVersion:
|
||||
description: 'HelmVersion is the version of Helm to target.
|
||||
If not supplied, the lowest _enabled Helm version_ will
|
||||
be targeted. Valid HelmVersion values are: "v2", "v3"'
|
||||
enum:
|
||||
- v2
|
||||
- v3
|
||||
type: string
|
||||
maxHistory:
|
||||
description: MaxHistory is the maximum amount of revisions
|
||||
to keep for the Helm release. If not supplied, it defaults
|
||||
to 10.
|
||||
type: integer
|
||||
namespace:
|
||||
description: Namespace to which the HelmRelease object will
|
||||
be deployed
|
||||
type: string
|
||||
overlays:
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
releaseName:
|
||||
description: ReleaseName is the name of the The Helm release.
|
||||
If not supplied, it will be generated by affixing the
|
||||
namespace to the resource name.
|
||||
type: string
|
||||
repo:
|
||||
description: ChartRepoNickname is used to lookup the repository
|
||||
config in the registries config map
|
||||
type: string
|
||||
repoPath:
|
||||
description: RepoPath provides the subdir path to the actual
|
||||
chart artifact within a Helm Registry Artifactory for
|
||||
instance utilizes folders to store charts
|
||||
type: string
|
||||
resetValues:
|
||||
description: ResetValues will mark this Helm release to
|
||||
reset the values to the defaults of the targeted chart
|
||||
before performing an upgrade. Not explicitly setting this
|
||||
to `false` equals to `true` due to the declarative nature
|
||||
of the operator.
|
||||
type: boolean
|
||||
rollback:
|
||||
description: The rollback settings for this Helm release.
|
||||
properties:
|
||||
disableHooks:
|
||||
description: DisableHooks will mark this Helm release
|
||||
to prevent hooks from running during the rollback.
|
||||
type: boolean
|
||||
enable:
|
||||
description: Enable will mark this Helm release for
|
||||
rollbacks.
|
||||
type: boolean
|
||||
force:
|
||||
description: Force will mark this Helm release to `--force`
|
||||
rollbacks. This forces the resource updates through
|
||||
delete/recreate if needed.
|
||||
type: boolean
|
||||
maxRetries:
|
||||
description: MaxRetries is the maximum amount of upgrade
|
||||
retries the operator should make before bailing.
|
||||
format: int64
|
||||
type: integer
|
||||
recreate:
|
||||
description: Recreate will mark this Helm release to
|
||||
`--recreate-pods` for if applicable. This performs
|
||||
pod restarts.
|
||||
type: boolean
|
||||
retry:
|
||||
description: Retry will mark this Helm release for upgrade
|
||||
retries after a rollback.
|
||||
type: boolean
|
||||
timeout:
|
||||
description: Timeout is the time to wait for any individual
|
||||
Kubernetes operation (like Jobs for hooks) during
|
||||
rollback.
|
||||
format: int64
|
||||
type: integer
|
||||
wait:
|
||||
description: Wait will mark this Helm release to wait
|
||||
until all Pods, PVCs, Services, and minimum number
|
||||
of Pods of a Deployment, StatefulSet, or ReplicaSet
|
||||
are in a ready state before marking the release as
|
||||
successful.
|
||||
type: boolean
|
||||
type: object
|
||||
skipCRDs:
|
||||
description: SkipCRDs will mark this Helm release to skip
|
||||
the creation of CRDs during a Helm 3 installation.
|
||||
type: boolean
|
||||
subcharts:
|
||||
items:
|
||||
properties:
|
||||
dependencies:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
name:
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
targetNamespace:
|
||||
description: TargetNamespace overrides the targeted namespace
|
||||
for the Helm release. The default namespace equals to
|
||||
the namespace of the HelmRelease resource.
|
||||
type: string
|
||||
test:
|
||||
description: The test settings for this Helm release.
|
||||
properties:
|
||||
cleanup:
|
||||
description: Cleanup, when targeting Helm 2, determines
|
||||
whether to delete test pods between each test run
|
||||
initiated by the Helm Operator.
|
||||
type: boolean
|
||||
enable:
|
||||
description: Enable will mark this Helm release for
|
||||
tests.
|
||||
type: boolean
|
||||
ignoreFailures:
|
||||
description: IgnoreFailures will cause a Helm release
|
||||
to be rolled back if it fails otherwise it will be
|
||||
left in a released state
|
||||
type: boolean
|
||||
timeout:
|
||||
description: Timeout is the time to wait for any individual
|
||||
Kubernetes operation (like Jobs for hooks) during
|
||||
test.
|
||||
format: int64
|
||||
type: integer
|
||||
type: object
|
||||
timeout:
|
||||
description: Timeout is the time to wait for any individual
|
||||
Kubernetes operation (like Jobs for hooks) during installation
|
||||
and upgrade operations.
|
||||
format: int64
|
||||
type: integer
|
||||
valueFileSecrets:
|
||||
description: ValueFileSecrets holds the local name references
|
||||
to secrets. DEPRECATED, use ValuesFrom.secretKeyRef instead.
|
||||
items:
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
values:
|
||||
description: Values holds the values for this Helm release.
|
||||
type: object
|
||||
valuesFrom:
|
||||
items:
|
||||
properties:
|
||||
chartFileRef:
|
||||
description: The reference to a local chart file with
|
||||
release values.
|
||||
properties:
|
||||
optional:
|
||||
description: Optional will mark this ChartFileSelector
|
||||
as optional. The result of this are that operations
|
||||
are permitted without the source, due to it
|
||||
e.g. being temporarily unavailable.
|
||||
type: boolean
|
||||
path:
|
||||
description: Path is the file path to the source
|
||||
relative to the chart root.
|
||||
type: string
|
||||
required:
|
||||
- path
|
||||
type: object
|
||||
configMapKeyRef:
|
||||
description: The reference to a config map with release
|
||||
values.
|
||||
properties:
|
||||
key:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
namespace:
|
||||
type: string
|
||||
optional:
|
||||
type: boolean
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
externalSourceRef:
|
||||
description: The reference to an external source with
|
||||
release values.
|
||||
properties:
|
||||
optional:
|
||||
description: Optional will mark this ExternalSourceSelector
|
||||
as optional. The result of this are that operations
|
||||
are permitted without the source, due to it
|
||||
e.g. being temporarily unavailable.
|
||||
type: boolean
|
||||
url:
|
||||
description: URL is the URL of the external source.
|
||||
type: string
|
||||
required:
|
||||
- url
|
||||
type: object
|
||||
secretKeyRef:
|
||||
description: The reference to a secret with release
|
||||
values.
|
||||
properties:
|
||||
key:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
namespace:
|
||||
type: string
|
||||
optional:
|
||||
type: boolean
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type: object
|
||||
type: array
|
||||
wait:
|
||||
description: Wait will mark this Helm release to wait until
|
||||
all Pods, PVCs, Services, and minimum number of Pods of
|
||||
a Deployment, StatefulSet, or ReplicaSet are in a ready
|
||||
state before marking the release as successful.
|
||||
type: boolean
|
||||
required:
|
||||
- chart
|
||||
type: object
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
status:
|
||||
description: ApplicationGroupStatus defines the observed state of ApplicationGroup
|
||||
properties:
|
||||
checksums:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
error:
|
||||
type: string
|
||||
phase:
|
||||
type: string
|
||||
status:
|
||||
items:
|
||||
properties:
|
||||
error:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
phase:
|
||||
description: 'HelmReleasePhase represents the phase a HelmRelease
|
||||
is in. Valid HelmReleasePhase values are: "ChartFetched",
|
||||
"ChartFetchFailed", "Installing", "Upgrading", "Deployed",
|
||||
"DeployFailed", "Testing", "TestFailed", "Tested", "Succeeded",
|
||||
"Failed", "RollingBack", "RolledBack", "RollbackFailed",'
|
||||
enum:
|
||||
- ChartFetched
|
||||
- ChartFetchFailed
|
||||
- Installing
|
||||
- Upgrading
|
||||
- Deployed
|
||||
- DeployFailed
|
||||
- Testing
|
||||
- TestFailed
|
||||
- Tested
|
||||
- Succeeded
|
||||
- Failed
|
||||
- RollingBack
|
||||
- RolledBack
|
||||
- RollbackFailed
|
||||
type: string
|
||||
staged:
|
||||
type: boolean
|
||||
subcharts:
|
||||
additionalProperties:
|
||||
description: ChartStatus denotes the current status of the
|
||||
Application Reconciliation
|
||||
properties:
|
||||
error:
|
||||
type: string
|
||||
phase:
|
||||
description: 'HelmReleasePhase represents the phase a
|
||||
HelmRelease is in. Valid HelmReleasePhase values are:
|
||||
"ChartFetched", "ChartFetchFailed", "Installing", "Upgrading",
|
||||
"Deployed", "DeployFailed", "Testing", "TestFailed",
|
||||
"Tested", "Succeeded", "Failed", "RollingBack", "RolledBack",
|
||||
"RollbackFailed",'
|
||||
enum:
|
||||
- ChartFetched
|
||||
- ChartFetchFailed
|
||||
- Installing
|
||||
- Upgrading
|
||||
- Deployed
|
||||
- DeployFailed
|
||||
- Testing
|
||||
- TestFailed
|
||||
- Tested
|
||||
- Succeeded
|
||||
- Failed
|
||||
- RollingBack
|
||||
- RolledBack
|
||||
- RollbackFailed
|
||||
type: string
|
||||
staged:
|
||||
type: boolean
|
||||
version:
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
version:
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
update:
|
||||
type: boolean
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
plural: ""
|
||||
conditions: []
|
||||
storedVersions: []
|
|
@ -3,27 +3,16 @@ apiVersion: rbac.authorization.k8s.io/v1
|
|||
metadata:
|
||||
name: {{ include "orkestra.serviceAccountName" . }}
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources: ["*"]
|
||||
verbs: ["*"]
|
||||
- apiGroups: ["apps"]
|
||||
resources: ["*"]
|
||||
verbs: ["*"]
|
||||
- apiGroups: ["rbac.authorization.k8s.io"]
|
||||
resources: ["*"]
|
||||
verbs: ["*"]
|
||||
- apiGroups: ["policy"]
|
||||
resources: ["*"]
|
||||
verbs: ["*"]
|
||||
- apiGroups: ["orkestra.azure.microsoft.com"]
|
||||
resources: ["*"]
|
||||
verbs: ["*"]
|
||||
- apiGroups: ["helm.fluxcd.io"]
|
||||
resources: ["*"]
|
||||
verbs: ["*"]
|
||||
- apiGroups: ["argoproj.io"]
|
||||
resources: ["*"]
|
||||
verbs: ["*"]
|
||||
- apiGroups:
|
||||
- '*'
|
||||
resources:
|
||||
- '*'
|
||||
verbs:
|
||||
- '*'
|
||||
- nonResourceURLs:
|
||||
- '*'
|
||||
verbs:
|
||||
- '*'
|
||||
|
||||
---
|
||||
kind: ClusterRoleBinding
|
||||
|
|
|
@ -6,7 +6,7 @@ replicaCount: 1
|
|||
image:
|
||||
repository: azureorkestra/orkestra
|
||||
pullPolicy: Always
|
||||
tag: "v0.2.1"
|
||||
tag: "latest"
|
||||
|
||||
imagePullSecrets: []
|
||||
nameOverride: ""
|
||||
|
@ -20,8 +20,10 @@ serviceAccount:
|
|||
repositories:
|
||||
- name: staging
|
||||
url: "http://orkestra-chartmuseum.orkestra:8080"
|
||||
- name: bitnami
|
||||
url: "https://charts.bitnami.com/bitnami"
|
||||
- name: datawire
|
||||
url: "https://www.getambassador.io/helm"
|
||||
- name: bookinfo
|
||||
url: "https://nitishm.github.io/istio-bookinfo-chart"
|
||||
# username: admin
|
||||
# password: password
|
||||
# authHeader: 'Authorization: Basic HTTPBASICAUTHCREDS'
|
||||
|
|
|
@ -0,0 +1,52 @@
|
|||
apiVersion: orkestra.azure.microsoft.com/v1alpha1
|
||||
kind: ApplicationGroup
|
||||
metadata:
|
||||
name: bookinfo
|
||||
spec:
|
||||
applications:
|
||||
- name: ambassador
|
||||
dependencies: []
|
||||
spec:
|
||||
namespace: orkestra
|
||||
repo: datawire
|
||||
groupID: "bookinfo"
|
||||
subcharts: []
|
||||
chart:
|
||||
repository: "https://www.getambassador.io"
|
||||
name: ambassador
|
||||
version: 6.6.0
|
||||
overlays:
|
||||
service:
|
||||
type: ClusterIP
|
||||
forceUpgrade: true
|
||||
targetNamespace: ambassador
|
||||
- name: bookinfo
|
||||
dependencies: [ambassador]
|
||||
spec:
|
||||
namespace: orkestra
|
||||
repo: bookinfo
|
||||
groupID: "bookinfo"
|
||||
subcharts:
|
||||
- name: productpage
|
||||
dependencies: [reviews]
|
||||
- name: reviews
|
||||
dependencies: [details, ratings]
|
||||
- name: ratings
|
||||
dependencies: []
|
||||
- name: details
|
||||
dependencies: []
|
||||
chart:
|
||||
repository: "https://nitishm.github.io/"
|
||||
name: bookinfo
|
||||
version: v1
|
||||
overlays:
|
||||
productpage:
|
||||
replicaCount: 1
|
||||
details:
|
||||
replicaCount: 1
|
||||
reviews:
|
||||
replicaCount: 1
|
||||
ratings:
|
||||
replicaCount: 1
|
||||
forceUpgrade: true
|
||||
targetNamespace: bookinfo
|
|
@ -1,55 +0,0 @@
|
|||
apiVersion: orkestra.azure.microsoft.com/v1alpha1
|
||||
kind: ApplicationGroup
|
||||
metadata:
|
||||
name: dev
|
||||
spec:
|
||||
applications:
|
||||
- name: kafka-dev
|
||||
dependencies:
|
||||
- redis-dev
|
||||
spec:
|
||||
namespace: "orkestra"
|
||||
repo: bitnami
|
||||
groupID: "dev"
|
||||
subcharts:
|
||||
# subchart ordering
|
||||
- name: zookeeper
|
||||
dependencies: []
|
||||
# HelmRelease spec fields
|
||||
# https://docs.fluxcd.io/projects/helm-operator/en/1.0.0-rc9/references/helmrelease-custom-resource.html#helmrelease-custom-resource
|
||||
chart:
|
||||
repository: "https://charts.bitnami.com/bitnami"
|
||||
name: kafka
|
||||
version: 12.4.1
|
||||
overlays:
|
||||
global:
|
||||
imagePullSecrets: []
|
||||
zookeerper:
|
||||
enabled: true
|
||||
targetNamespace: "kafka-dev-ns"
|
||||
forceUpgrade: true
|
||||
- name: redis-dev
|
||||
spec:
|
||||
namespace: "orkestra"
|
||||
repo: bitnami
|
||||
groupID: "dev"
|
||||
subcharts: []
|
||||
# HelmRelease spec fields
|
||||
# https://docs.fluxcd.io/projects/helm-operator/en/1.0.0-rc9/references/helmrelease-custom-resource.html#helmrelease-custom-resource
|
||||
chart:
|
||||
repository: "https://charts.bitnami.com/bitnami"
|
||||
name: redis
|
||||
version: 12.2.3
|
||||
overlays:
|
||||
global:
|
||||
imagePullSecrets: []
|
||||
master:
|
||||
persistence:
|
||||
size: 4Gi
|
||||
targetNamespace: "redis-dev-ns"
|
||||
forceUpgrade: true
|
||||
|
||||
# TODO (nitishm) - define these fields using Argo Workflow spec
|
||||
# strategy:
|
||||
# rollout:
|
||||
# backout:
|
|
@ -1,8 +1,8 @@
|
|||
# Instructions
|
||||
|
||||
In this example we deploy an application group consisting of two demo applications,
|
||||
- kafka (and it's dependent chart - zookeeper)
|
||||
- redis
|
||||
- Istio bookinfo app (with subcharts)
|
||||
- Ambassador
|
||||
|
||||
## Prerequisites
|
||||
|
||||
|
@ -11,44 +11,54 @@ In this example we deploy an application group consisting of two demo applicatio
|
|||
Install the `ApplicationGroup`:
|
||||
|
||||
```console
|
||||
kubectl apply -f examples/simple
|
||||
kubectl apply -f examples/simple/bookinfo.yaml
|
||||
|
||||
applicationgroup.orkestra.azure.microsoft.com/dev created
|
||||
applicationgroup.orkestra.azure.microsoft.com/bookinfo created
|
||||
```
|
||||
|
||||
The orkestra controller logs should look as follows on success,
|
||||
|
||||
```log
|
||||
orkestra-6967b4676b-h94dl orkestra 2021-03-03T19:45:15.655Z INFO controller-runtime.metrics metrics server is starting to listen {"addr": ":8080"}
|
||||
orkestra-6967b4676b-h94dl orkestra 2021-03-03T19:45:19.360Z INFO setup starting manager
|
||||
orkestra-6967b4676b-h94dl orkestra 2021-03-03T19:45:19.360Z INFO controller-runtime.manager starting metrics server {"path": "/metrics"}
|
||||
orkestra-6967b4676b-h94dl orkestra 2021-03-03T19:45:19.360Z INFO controller-runtime.controller Starting EventSource {"controller": "applicationgroup", "source": "kind source: /, Kind="}
|
||||
orkestra-6967b4676b-h94dl orkestra 2021-03-03T19:45:19.461Z INFO controller-runtime.controller Starting Controller {"controller": "applicationgroup"}
|
||||
orkestra-6967b4676b-h94dl orkestra 2021-03-03T19:45:19.461Z INFO controller-runtime.controller Starting workers {"controller": "applicationgroup", "worker count": 1}
|
||||
orkestra-6967b4676b-h94dl orkestra 2021-03-03T19:45:28.347Z DEBUG controllers.ApplicationGroup workflow in pending/running state. requeue and reconcile after a short period {"appgroup": "dev", "phase": "Running", "status-error": ""}
|
||||
orkestra-6967b4676b-h94dl orkestra 2021-03-03T19:45:28.520Z DEBUG controllers.ApplicationGroup workflow in pending/running state. requeue and reconcile after a short period {"appgroup": "dev", "phase": "Running", "status-error": ""}
|
||||
orkestra-6967b4676b-h94dl orkestra 2021-03-03T19:45:33.528Z DEBUG controllers.ApplicationGroup workflow in pending/running state. requeue and reconcile after a short period {"appgroup": "dev", "phase": "Running", "status-error": ""}
|
||||
orkestra-6967b4676b-h94dl orkestra 2021-03-03T19:45:38.539Z DEBUG controllers.ApplicationGroup workflow in pending/running state. requeue and reconcile after a short period {"appgroup": "dev", "phase": "Running", "status-error": ""}
|
||||
orkestra-6967b4676b-h94dl orkestra 2021-03-03T19:45:43.550Z DEBUG controllers.ApplicationGroup workflow in pending/running state. requeue and reconcile after a short period {"appgroup": "dev", "phase": "Running", "status-error": ""}
|
||||
orkestra-6967b4676b-h94dl orkestra 2021-03-03T19:45:48.557Z DEBUG controllers.ApplicationGroup workflow in pending/running state. requeue and reconcile after a short period {"appgroup": "dev", "phase": "Running", "status-error": ""}
|
||||
orkestra-6967b4676b-h94dl orkestra 2021-03-03T19:45:53.566Z DEBUG controllers.ApplicationGroup workflow in pending/running state. requeue and reconcile after a short period {"appgroup": "dev", "phase": "Running", "status-error": ""}
|
||||
orkestra-6967b4676b-h94dl orkestra 2021-03-03T19:45:58.572Z DEBUG controllers.ApplicationGroup workflow ran to completion and succeeded {"appgroup": "dev", "phase": "Succeeded", "status-error": ""}
|
||||
orkestra-6967b4676b-h94dl orkestra 2021-03-03T19:45:58.580Z DEBUG controller-runtime.controller Successfully Reconciled {"controller": "applicationgroup", "request": "/dev"}
|
||||
orkestra-6967b4676b-h94dl orkestra 2021-03-03T19:45:58.581Z DEBUG controller-runtime.manager.events Normal {"object": {"kind":"ApplicationGroup","name":"dev","uid":"37f39abe-4a5e-40e6-ae6d-323ef56a8263","apiVersion":"orkestra.azure.microsoft.com/v1alpha1","resourceVersion":"32178"}, "reason": "ReconcileSuccess", "message": "Successfully reconciled ApplicationGroup dev"}
|
||||
orkestra-885c5ff4-kh7n9 orkestra 2021-03-23T07:53:24.452Z INFO setup starting manager
|
||||
orkestra-885c5ff4-kh7n9 orkestra 2021-03-23T07:53:24.453Z INFO controller-runtime.manager starting metrics server {"path": "/metrics"}
|
||||
orkestra-885c5ff4-kh7n9 orkestra 2021-03-23T07:53:24.453Z INFO controller-runtime.controller Starting EventSource {"controller": "applicationgroup", "source": "kind source: /, Kind="}
|
||||
orkestra-885c5ff4-kh7n9 orkestra 2021-03-23T07:53:24.554Z INFO controller-runtime.controller Starting Controller {"controller": "applicationgroup"}
|
||||
orkestra-885c5ff4-kh7n9 orkestra 2021-03-23T07:53:24.554Z INFO controller-runtime.controller Starting workers {"controller": "applicationgroup", "worker count": 1}
|
||||
orkestra-885c5ff4-kh7n9 orkestra 2021-03-23T08:02:28.525Z DEBUG controllers.ApplicationGroup workflow in init/running state. requeue and reconcile after a short period {"appgroup": "bookinfo"}
|
||||
orkestra-885c5ff4-kh7n9 orkestra 2021-03-23T08:02:58.543Z DEBUG controllers.ApplicationGroup workflow in init/running state. requeue and reconcile after a short period {"appgroup": "bookinfo"}
|
||||
orkestra-885c5ff4-kh7n9 orkestra 2021-03-23T08:03:03.553Z DEBUG controllers.ApplicationGroup workflow in init/running state. requeue and reconcile after a short period {"appgroup": "bookinfo"}
|
||||
orkestra-885c5ff4-kh7n9 orkestra 2021-03-23T08:03:08.563Z DEBUG controllers.ApplicationGroup workflow in init/running state. requeue and reconcile after a short period {"appgroup": "bookinfo"}
|
||||
orkestra-885c5ff4-kh7n9 orkestra 2021-03-23T08:03:13.571Z DEBUG controllers.ApplicationGroup workflow in init/running state. requeue and reconcile after a short period {"appgroup": "bookinfo"}
|
||||
orkestra-885c5ff4-kh7n9 orkestra 2021-03-23T08:03:18.581Z DEBUG controllers.ApplicationGroup workflow in init/running state. requeue and reconcile after a short period {"appgroup": "bookinfo"}
|
||||
orkestra-885c5ff4-kh7n9 orkestra 2021-03-23T08:03:23.589Z DEBUG controllers.ApplicationGroup workflow in init/running state. requeue and reconcile after a short period {"appgroup": "bookinfo"}
|
||||
orkestra-885c5ff4-kh7n9 orkestra 2021-03-23T08:03:28.611Z DEBUG controllers.ApplicationGroup workflow in init/running state. requeue and reconcile after a short period {"appgroup": "bookinfo"}
|
||||
orkestra-885c5ff4-kh7n9 orkestra 2021-03-23T08:03:33.650Z DEBUG controllers.ApplicationGroup workflow in init/running state. requeue and reconcile after a short period {"appgroup": "bookinfo"}
|
||||
orkestra-885c5ff4-kh7n9 orkestra 2021-03-23T08:03:38.673Z DEBUG controllers.ApplicationGroup workflow in init/running state. requeue and reconcile after a short period {"appgroup": "bookinfo"}
|
||||
orkestra-885c5ff4-kh7n9 orkestra 2021-03-23T08:03:43.706Z DEBUG controllers.ApplicationGroup workflow in init/running state. requeue and reconcile after a short period {"appgroup": "bookinfo"}
|
||||
orkestra-885c5ff4-kh7n9 orkestra 2021-03-23T08:03:48.723Z DEBUG controllers.ApplicationGroup workflow in init/running state. requeue and reconcile after a short period {"appgroup": "bookinfo"}
|
||||
orkestra-885c5ff4-kh7n9 orkestra 2021-03-23T08:03:53.768Z DEBUG controllers.ApplicationGroup workflow in init/running state. requeue and reconcile after a short period {"appgroup": "bookinfo"}
|
||||
orkestra-885c5ff4-kh7n9 orkestra 2021-03-23T08:03:58.792Z DEBUG controllers.ApplicationGroup workflow in init/running state. requeue and reconcile after a short period {"appgroup": "bookinfo"}
|
||||
orkestra-885c5ff4-kh7n9 orkestra 2021-03-23T08:04:03.825Z DEBUG controllers.ApplicationGroup workflow in init/running state. requeue and reconcile after a short period {"appgroup": "bookinfo"}
|
||||
orkestra-885c5ff4-kh7n9 orkestra 2021-03-23T08:04:08.844Z DEBUG controllers.ApplicationGroup workflow in init/running state. requeue and reconcile after a short period {"appgroup": "bookinfo"}
|
||||
orkestra-885c5ff4-kh7n9 orkestra 2021-03-23T08:04:13.865Z DEBUG controllers.ApplicationGroup workflow in init/running state. requeue and reconcile after a short period {"appgroup": "bookinfo"}
|
||||
orkestra-885c5ff4-kh7n9 orkestra 2021-03-23T08:04:18.875Z DEBUG controllers.ApplicationGroup workflow ran to completion and succeeded {"appgroup": "bookinfo"}
|
||||
orkestra-885c5ff4-kh7n9 orkestra 2021-03-23T08:04:18.901Z DEBUG controller-runtime.controller Successfully Reconciled {"controller": "applicationgroup", "request": "/bookinfo"}
|
||||
orkestra-885c5ff4-kh7n9 orkestra 2021-03-23T08:04:18.902Z DEBUG controller-runtime.manager.events Normal {"object": {"kind":"ApplicationGroup","name":"bookinfo","uid":"52c5095e-0aa1-4067-a434-f1155ebbbdcd","apiVersion":"orkestra.azure.microsoft.com/v1alpha1","resourceVersion":"30145"}, "reason": "ReconcileSuccess", "message": "Successfully reconciled ApplicationGroup bookinfo"}
|
||||
```
|
||||
|
||||
(_optional_) The Argo dashboard should show the DAG nodes in Green
|
||||
|
||||
<p align="center"><img src="./workflow.png" width="750x" /></p>
|
||||
|
||||
**Verify that the Application helm release have been successfully deployed**
|
||||
|
||||
```console
|
||||
helm ls
|
||||
|
||||
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
|
||||
orkestra orkestra 1 2021-02-03 00:53:59.4021554 -0800 PST deployed orkestra-0.1.0 0.1.0
|
||||
orkestra-kafka-dev orkestra 1 2021-02-03 09:22:10.6098917 +0000 UTC deployed kafka-12.4.1 2.7.0
|
||||
orkestra-redis-dev orkestra 1 2021-02-03 09:21:29.2499689 +0000 UTC deployed redis-12.2.3 6.0.9
|
||||
orkestra-zookeeper orkestra 1 2021-02-03 09:21:46.9612055 +0000 UTC deployed zookeeper-6.2.1 3.6.2
|
||||
orkestra orkestra 1 2021-03-23 08:02:15.0044864 +0000 UTC deployed orkestra-0.1.0 0.1.0
|
||||
ambassador ambassador 1 2021-03-23 08:02:35.0044864 +0000 UTC deployed ambassador-6.6.0 1.12.1
|
||||
bookinfo bookinfo 1 2021-03-23 08:04:08.6088786 +0000 UTC deployed bookinfo-v1 0.16.2
|
||||
details bookinfo 1 2021-03-23 08:03:26.1043919 +0000 UTC deployed details-v1 1.16.2
|
||||
productpage bookinfo 1 2021-03-23 08:03:47.4150589 +0000 UTC deployed productpage-v1 1.16.2
|
||||
ratings bookinfo 1 2021-03-23 08:03:25.9770024 +0000 UTC deployed ratings-v1 1.16.2
|
||||
reviews bookinfo 1 2021-03-23 08:03:36.9634599 +0000 UTC deployed reviews-v1 1.16.2
|
||||
```
|
|
@ -0,0 +1,52 @@
|
|||
apiVersion: orkestra.azure.microsoft.com/v1alpha1
|
||||
kind: ApplicationGroup
|
||||
metadata:
|
||||
name: bookinfo
|
||||
spec:
|
||||
applications:
|
||||
- name: ambassador
|
||||
dependencies: []
|
||||
spec:
|
||||
namespace: orkestra
|
||||
repo: datawire
|
||||
groupID: "bookinfo"
|
||||
subcharts: []
|
||||
chart:
|
||||
repository: "https://www.getambassador.io"
|
||||
name: ambassador
|
||||
version: 6.6.0
|
||||
overlays:
|
||||
service:
|
||||
type: ClusterIP
|
||||
forceUpgrade: true
|
||||
targetNamespace: ambassador
|
||||
- name: bookinfo
|
||||
dependencies: [ambassador]
|
||||
spec:
|
||||
namespace: orkestra
|
||||
repo: bookinfo
|
||||
groupID: "bookinfo"
|
||||
subcharts:
|
||||
- name: productpage
|
||||
dependencies: [reviews]
|
||||
- name: reviews
|
||||
dependencies: [details, ratings]
|
||||
- name: ratings
|
||||
dependencies: []
|
||||
- name: details
|
||||
dependencies: []
|
||||
chart:
|
||||
repository: "https://nitishm.github.io/"
|
||||
name: bookinfo
|
||||
version: v1
|
||||
overlays:
|
||||
productpage:
|
||||
replicaCount: 1
|
||||
details:
|
||||
replicaCount: 1
|
||||
reviews:
|
||||
replicaCount: 1
|
||||
ratings:
|
||||
replicaCount: 1
|
||||
forceUpgrade: true
|
||||
targetNamespace: bookinfo
|
|
@ -1,56 +0,0 @@
|
|||
apiVersion: orkestra.azure.microsoft.com/v1alpha1
|
||||
kind: ApplicationGroup
|
||||
metadata:
|
||||
name: dev
|
||||
spec:
|
||||
applications:
|
||||
# ERROR: Kafka fails on kind cluster causing the workflow to stall
|
||||
# - name: kafka-dev
|
||||
# dependencies:
|
||||
# - redis-dev
|
||||
# spec:
|
||||
# namespace: "orkestra"
|
||||
# repo: bitnami
|
||||
# groupID: "dev"
|
||||
# subcharts:
|
||||
# # subchart ordering
|
||||
# - name: zookeeper
|
||||
# dependencies: []
|
||||
# # HelmRelease spec fields
|
||||
# # https://docs.fluxcd.io/projects/helm-operator/en/1.0.0-rc9/references/helmrelease-custom-resource.html#helmrelease-custom-resource
|
||||
# chart:
|
||||
# repository: "https://charts.bitnami.com/bitnami"
|
||||
# name: kafka
|
||||
# version: 12.4.1
|
||||
# overlays:
|
||||
# global:
|
||||
# imagePullSecrets: []
|
||||
# zookeerper:
|
||||
# enabled: true
|
||||
# targetNamespace: "kafka-dev-ns"
|
||||
# forceUpgrade: true
|
||||
- name: redis-dev
|
||||
spec:
|
||||
namespace: "orkestra"
|
||||
repo: bitnami
|
||||
groupID: "dev"
|
||||
subcharts: []
|
||||
# HelmRelease spec fields
|
||||
# https://docs.fluxcd.io/projects/helm-operator/en/1.0.0-rc9/references/helmrelease-custom-resource.html#helmrelease-custom-resource
|
||||
chart:
|
||||
repository: "https://charts.bitnami.com/bitnami"
|
||||
name: redis
|
||||
version: 12.2.3
|
||||
overlays:
|
||||
global:
|
||||
imagePullSecrets: []
|
||||
master:
|
||||
persistence:
|
||||
size: 4Gi
|
||||
targetNamespace: "redis-dev-ns"
|
||||
forceUpgrade: true
|
||||
|
||||
# TODO (nitishm) - define these fields using Argo Workflow spec
|
||||
# strategy:
|
||||
# rollout:
|
||||
# backout:
|
Двоичные данные
examples/simple/workflow.png
Двоичные данные
examples/simple/workflow.png
Двоичный файл не отображается.
До Ширина: | Высота: | Размер: 173 KiB |
|
@ -315,7 +315,6 @@ func (a *argo) generateAppDAGTemplates(ctx context.Context, g *v1alpha1.Applicat
|
|||
|
||||
hr.Spec.Wait = boolToBoolPtr(true)
|
||||
hr.Spec.ReleaseName = convertToDNS1123(app.Name)
|
||||
hr.Spec.SkipCRDs = true
|
||||
|
||||
hr.Labels = map[string]string{
|
||||
ChartLabelKey: app.Name,
|
||||
|
@ -409,7 +408,6 @@ func (a *argo) generateSubchartAndAppDAGTasks(ctx context.Context, g *v1alpha1.A
|
|||
|
||||
hr.Spec.ReleaseName = convertToDNS1123(app.Name)
|
||||
hr.Spec.Wait = boolToBoolPtr(true)
|
||||
hr.Spec.SkipCRDs = true
|
||||
|
||||
hr.Labels = map[string]string{
|
||||
ChartLabelKey: app.Name,
|
||||
|
@ -513,7 +511,6 @@ func generateSubchartHelmRelease(a helmopv1.HelmReleaseSpec, appName, scName, ve
|
|||
// NOTE: Ownership label is added in the caller function
|
||||
hr.Spec.ChartSource.RepoChartSource = a.DeepCopy().RepoChartSource
|
||||
hr.Spec.ChartSource.RepoChartSource.Name = scName
|
||||
hr.Spec.SkipCRDs = true
|
||||
hr.Spec.Wait = boolToBoolPtr(true)
|
||||
|
||||
if isStaged {
|
||||
|
|
Загрузка…
Ссылка в новой задаче