Skip to content

Commit 9ed22e2

Browse files
committed
feat: write arch to state
1 parent a12deb9 commit 9ed22e2

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/pkg/cluster/cluster.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,6 @@ func (c *Cluster) InitState(ctx context.Context, opts InitStateOptions) (*state.
207207
}
208208
s.AgentTLS = agentTLS
209209

210-
// Set the Architecture
211-
s.Architecture = opts.Architecture
212-
213210
namespaceList, err := c.Clientset.CoreV1().Namespaces().List(ctx, metav1.ListOptions{})
214211
if err != nil {
215212
return nil, fmt.Errorf("unable to get the Kubernetes namespaces: %w", err)
@@ -298,6 +295,11 @@ func (c *Cluster) InitState(ctx context.Context, opts InitStateOptions) (*state.
298295
s.StorageClass = opts.StorageClass
299296
}
300297

298+
// Set the Architecture
299+
if s.Architecture == "" {
300+
s.Architecture = opts.Architecture
301+
}
302+
301303
// Save the state back to K8s
302304
if err := c.SaveState(ctx, s); err != nil {
303305
return nil, fmt.Errorf("unable to save the Zarf state: %w", err)

0 commit comments

Comments
 (0)