diff --git a/internal/apply/planner.go b/internal/apply/planner.go index f247e16..a9219ea 100644 --- a/internal/apply/planner.go +++ b/internal/apply/planner.go @@ -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 diff --git a/sdk/examples/comprehensive/EdgeConnectConfig.yaml b/sdk/examples/comprehensive/EdgeConnectConfig.yaml index 37bde30..842494a 100644 --- a/sdk/examples/comprehensive/EdgeConnectConfig.yaml +++ b/sdk/examples/comprehensive/EdgeConnectConfig.yaml @@ -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"