feat(cli): Added hash compare between current and desired manifest state without using annotation. instead the current hash is calculated from the showapp() app.deploymentmanifest field
This commit is contained in:
parent
6de170f6cf
commit
e092f352f8
2 changed files with 6 additions and 1 deletions
|
|
@ -304,6 +304,11 @@ func (p *EdgeConnectPlanner) getCurrentAppState(ctx context.Context, desired *Ap
|
|||
LastUpdated: time.Now(), // EdgeConnect doesn't provide this, so use current time
|
||||
}
|
||||
|
||||
// Calculate current manifest hash
|
||||
hasher := sha256.New()
|
||||
hasher.Write([]byte(app.DeploymentManifest))
|
||||
current.ManifestHash = fmt.Sprintf("%x", hasher.Sum(nil))
|
||||
|
||||
// Note: EdgeConnect API doesn't currently support annotations for manifest hash tracking
|
||||
// This would be implemented when the API supports it
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ spec:
|
|||
# image: "https://registry-1.docker.io/library/nginx:latest"
|
||||
k8sApp:
|
||||
appVersion: "1.0.0"
|
||||
manifestFile: "./k8s-deployment.yaml" # store hash of the manifest file in annotation field. Annotations is a comma separated map of arbitrary key value pairs,
|
||||
manifestFile: "./k8s-deployment.yaml"
|
||||
infraTemplate:
|
||||
- organization: "edp2"
|
||||
region: "EU"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue