Documentation
¶
Index ¶
- type AzureBlobDefinition
- type AzureBlobPatchDefinition
- type BucketDefinition
- type BucketPatchDefinition
- type Client
- func (client *Client) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, clusterRp string, ...) (*runtime.Poller[ClientCreateOrUpdateResponse], error)
- func (client *Client) BeginDelete(ctx context.Context, resourceGroupName string, clusterRp string, ...) (*runtime.Poller[ClientDeleteResponse], error)
- func (client *Client) BeginUpdate(ctx context.Context, resourceGroupName string, clusterRp string, ...) (*runtime.Poller[ClientUpdateResponse], error)
- func (client *Client) Get(ctx context.Context, resourceGroupName string, clusterRp string, ...) (ClientGetResponse, error)
- func (client *Client) NewListPager(resourceGroupName string, clusterRp string, clusterResourceName string, ...) *runtime.Pager[ClientListResponse]
- type ClientBeginCreateOrUpdateOptions
- type ClientBeginDeleteOptions
- type ClientBeginUpdateOptions
- type ClientCreateOrUpdateResponse
- type ClientDeleteResponse
- type ClientFactory
- type ClientGetOptions
- type ClientGetResponse
- type ClientListOptions
- type ClientListResponse
- type ClientUpdateResponse
- type CreatedByType
- type ErrorAdditionalInfo
- type ErrorDetail
- type FluxComplianceState
- type FluxConfigOperationStatusClient
- type FluxConfigOperationStatusClientGetOptions
- type FluxConfigOperationStatusClientGetResponse
- type FluxConfiguration
- type FluxConfigurationPatch
- type FluxConfigurationPatchProperties
- type FluxConfigurationProperties
- type GitRepositoryDefinition
- type GitRepositoryPatchDefinition
- type HelmReleasePropertiesDefinition
- type KustomizationDefinition
- type KustomizationPatchDefinition
- type LayerSelectorDefinition
- type LayerSelectorPatchDefinition
- type List
- type ManagedIdentityDefinition
- type ManagedIdentityPatchDefinition
- type MatchOidcIdentityDefinition
- type MatchOidcIdentityPatchDefinition
- type OCIRepositoryDefinition
- type OCIRepositoryPatchDefinition
- type OCIRepositoryRefDefinition
- type OCIRepositoryRefPatchDefinition
- type ObjectReferenceDefinition
- type ObjectStatusConditionDefinition
- type ObjectStatusDefinition
- type OperationStatusResult
- type OperationType
- type PostBuildDefinition
- type PostBuildPatchDefinition
- type ProviderType
- type ProvisioningState
- type RepositoryRefDefinition
- type ScopeType
- type ServicePrincipalDefinition
- type ServicePrincipalPatchDefinition
- type SourceKindType
- type SubstituteFromDefinition
- type SubstituteFromPatchDefinition
- type SystemData
- type TLSConfigDefinition
- type TLSConfigPatchDefinition
- type VerifyDefinition
- type VerifyPatchDefinition
Examples ¶
- Client.BeginCreateOrUpdate (CreateFluxConfiguration)
- Client.BeginCreateOrUpdate (CreateFluxConfigurationWithBucketSourceKind)
- Client.BeginCreateOrUpdate (CreateFluxConfigurationWithGitRepositoryProvider)
- Client.BeginCreateOrUpdate (CreateFluxConfigurationWithOciRepositorySourceKind)
- Client.BeginDelete
- Client.BeginUpdate
- Client.Get
- Client.NewListPager
- FluxConfigOperationStatusClient.Get
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AzureBlobDefinition ¶
type AzureBlobDefinition struct {
// The account key (shared key) to access the storage account
AccountKey *string
// The Azure Blob container name to sync from the url endpoint for the flux configuration.
ContainerName *string
// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided
// configuration secrets.
LocalAuthRef *string
// Parameters to authenticate using a Managed Identity.
ManagedIdentity *ManagedIdentityDefinition
// The Shared Access token to access the storage container
SasToken *string
// Parameters to authenticate using Service Principal.
ServicePrincipal *ServicePrincipalDefinition
// The interval at which to re-reconcile the cluster Azure Blob source with the remote.
SyncIntervalInSeconds *int64
// The maximum time to attempt to reconcile the cluster Azure Blob source with the remote.
TimeoutInSeconds *int64
// The URL to sync for the flux configuration Azure Blob storage account.
URL *string
}
AzureBlobDefinition - Parameters to reconcile to the AzureBlob source kind type.
func (AzureBlobDefinition) MarshalJSON ¶
func (a AzureBlobDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AzureBlobDefinition.
func (*AzureBlobDefinition) UnmarshalJSON ¶
func (a *AzureBlobDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AzureBlobDefinition.
type AzureBlobPatchDefinition ¶
type AzureBlobPatchDefinition struct {
// The account key (shared key) to access the storage account
AccountKey *string
// The Azure Blob container name to sync from the url endpoint for the flux configuration.
ContainerName *string
// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided
// configuration secrets.
LocalAuthRef *string
// Parameters to authenticate using a Managed Identity.
ManagedIdentity *ManagedIdentityPatchDefinition
// The Shared Access token to access the storage container
SasToken *string
// Parameters to authenticate using Service Principal.
ServicePrincipal *ServicePrincipalPatchDefinition
// The interval at which to re-reconcile the cluster Azure Blob source with the remote.
SyncIntervalInSeconds *int64
// The maximum time to attempt to reconcile the cluster Azure Blob source with the remote.
TimeoutInSeconds *int64
// The URL to sync for the flux configuration Azure Blob storage account.
URL *string
}
AzureBlobPatchDefinition - Parameters to reconcile to the AzureBlob source kind type.
func (AzureBlobPatchDefinition) MarshalJSON ¶
func (a AzureBlobPatchDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AzureBlobPatchDefinition.
func (*AzureBlobPatchDefinition) UnmarshalJSON ¶
func (a *AzureBlobPatchDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AzureBlobPatchDefinition.
type BucketDefinition ¶
type BucketDefinition struct {
// Plaintext access key used to securely access the S3 bucket
AccessKey *string
// The bucket name to sync from the url endpoint for the flux configuration.
BucketName *string
// Specify whether to use insecure communication when puling data from the S3 bucket.
Insecure *bool
// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided
// configuration secrets.
LocalAuthRef *string
// The interval at which to re-reconcile the cluster bucket source with the remote.
SyncIntervalInSeconds *int64
// The maximum time to attempt to reconcile the cluster bucket source with the remote.
TimeoutInSeconds *int64
// The URL to sync for the flux configuration S3 bucket.
URL *string
}
BucketDefinition - Parameters to reconcile to the Bucket source kind type.
func (BucketDefinition) MarshalJSON ¶
func (b BucketDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BucketDefinition.
func (*BucketDefinition) UnmarshalJSON ¶
func (b *BucketDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BucketDefinition.
type BucketPatchDefinition ¶
type BucketPatchDefinition struct {
// Plaintext access key used to securely access the S3 bucket
AccessKey *string
// The bucket name to sync from the url endpoint for the flux configuration.
BucketName *string
// Specify whether to use insecure communication when puling data from the S3 bucket.
Insecure *bool
// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided
// configuration secrets.
LocalAuthRef *string
// The interval at which to re-reconcile the cluster bucket source with the remote.
SyncIntervalInSeconds *int64
// The maximum time to attempt to reconcile the cluster bucket source with the remote.
TimeoutInSeconds *int64
// The URL to sync for the flux configuration S3 bucket.
URL *string
}
BucketPatchDefinition - Parameters to reconcile to the Bucket source kind type.
func (BucketPatchDefinition) MarshalJSON ¶
func (b BucketPatchDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BucketPatchDefinition.
func (*BucketPatchDefinition) UnmarshalJSON ¶
func (b *BucketPatchDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BucketPatchDefinition.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client contains the methods for the FluxConfigurations group. Don't use this type directly, use NewClient() instead.
func NewClient ¶
func NewClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*Client, error)
NewClient creates a new instance of Client with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*Client) BeginCreateOrUpdate ¶
func (client *Client) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, clusterRp string, clusterResourceName string, clusterName string, fluxConfigurationName string, fluxConfiguration FluxConfiguration, options *ClientBeginCreateOrUpdateOptions) (*runtime.Poller[ClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Create a new Kubernetes Flux Configuration. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2025-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterRp - The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.
- clusterResourceName - The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters, appliances.
- clusterName - The name of the kubernetes cluster.
- fluxConfigurationName - Name of the Flux Configuration.
- fluxConfiguration - Properties necessary to Create a FluxConfiguration.
- options - ClientBeginCreateOrUpdateOptions contains the optional parameters for the Client.BeginCreateOrUpdate method.
Example (CreateFluxConfiguration) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba0c086df0ebe03a61579485c1c10de0d17804b2/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/fluxConfigurations/stable/2025-04-01/examples/CreateFluxConfiguration.json
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kubernetesconfiguration/armfluxconfigurations"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armfluxconfigurations.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewClient().BeginCreateOrUpdate(ctx, "rg1", "Microsoft.Kubernetes", "connectedClusters", "clusterName1", "srs-fluxconfig", armfluxconfigurations.FluxConfiguration{
Properties: &armfluxconfigurations.FluxConfigurationProperties{
GitRepository: &armfluxconfigurations.GitRepositoryDefinition{
HTTPSCACert: to.Ptr("ZXhhbXBsZWNlcnRpZmljYXRl"),
RepositoryRef: &armfluxconfigurations.RepositoryRefDefinition{
Branch: to.Ptr("master"),
},
SyncIntervalInSeconds: to.Ptr[int64](600),
TimeoutInSeconds: to.Ptr[int64](600),
URL: to.Ptr("https://github.com/Azure/arc-k8s-demo"),
},
Kustomizations: map[string]*armfluxconfigurations.KustomizationDefinition{
"srs-kustomization1": {
Path: to.Ptr("./test/path"),
DependsOn: []*string{},
PostBuild: &armfluxconfigurations.PostBuildDefinition{
Substitute: map[string]*string{
"cluster_env": to.Ptr("prod"),
"replica_count": to.Ptr("2"),
},
SubstituteFrom: []*armfluxconfigurations.SubstituteFromDefinition{
{
Name: to.Ptr("cluster-test"),
Kind: to.Ptr("ConfigMap"),
Optional: to.Ptr(true),
}},
},
SyncIntervalInSeconds: to.Ptr[int64](600),
TimeoutInSeconds: to.Ptr[int64](600),
Wait: to.Ptr(true),
},
"srs-kustomization2": {
Path: to.Ptr("./other/test/path"),
DependsOn: []*string{
to.Ptr("srs-kustomization1")},
PostBuild: &armfluxconfigurations.PostBuildDefinition{
SubstituteFrom: []*armfluxconfigurations.SubstituteFromDefinition{
{
Name: to.Ptr("cluster-values"),
Kind: to.Ptr("ConfigMap"),
Optional: to.Ptr(true),
},
{
Name: to.Ptr("secret-name"),
Kind: to.Ptr("Secret"),
Optional: to.Ptr(false),
}},
},
Prune: to.Ptr(false),
RetryIntervalInSeconds: to.Ptr[int64](600),
SyncIntervalInSeconds: to.Ptr[int64](600),
TimeoutInSeconds: to.Ptr[int64](600),
Wait: to.Ptr(false),
},
},
Namespace: to.Ptr("srs-namespace"),
ReconciliationWaitDuration: to.Ptr("PT30M"),
Scope: to.Ptr(armfluxconfigurations.ScopeTypeCluster),
SourceKind: to.Ptr(armfluxconfigurations.SourceKindTypeGitRepository),
Suspend: to.Ptr(false),
WaitForReconciliation: to.Ptr(true),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.FluxConfiguration = armfluxconfigurations.FluxConfiguration{
// Name: to.Ptr("srs-fluxconfig"),
// Type: to.Ptr("Microsoft.KubernetesConfiguration/fluxConfigurations"),
// ID: to.Ptr("/subscriptions/subId1/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/clusterName1/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/srs-fluxconfig"),
// Properties: &armfluxconfigurations.FluxConfigurationProperties{
// ComplianceState: to.Ptr(armfluxconfigurations.FluxComplianceStateCompliant),
// ErrorMessage: to.Ptr(""),
// GitRepository: &armfluxconfigurations.GitRepositoryDefinition{
// HTTPSCACert: to.Ptr("ZXhhbXBsZWNlcnRpZmljYXRl"),
// RepositoryRef: &armfluxconfigurations.RepositoryRefDefinition{
// Branch: to.Ptr("master"),
// },
// SyncIntervalInSeconds: to.Ptr[int64](600),
// TimeoutInSeconds: to.Ptr[int64](600),
// URL: to.Ptr("https://github.com/Azure/arc-k8s-demo"),
// },
// Kustomizations: map[string]*armfluxconfigurations.KustomizationDefinition{
// "srs-kustomization1": &armfluxconfigurations.KustomizationDefinition{
// Name: to.Ptr("srs-kustomization1"),
// Path: to.Ptr("./test/path"),
// DependsOn: []*string{
// },
// PostBuild: &armfluxconfigurations.PostBuildDefinition{
// Substitute: map[string]*string{
// "cluster_env": to.Ptr("prod"),
// "replica_count": to.Ptr("2"),
// },
// SubstituteFrom: []*armfluxconfigurations.SubstituteFromDefinition{
// {
// Name: to.Ptr("cluster-test"),
// Kind: to.Ptr("ConfigMap"),
// Optional: to.Ptr(true),
// }},
// },
// SyncIntervalInSeconds: to.Ptr[int64](600),
// TimeoutInSeconds: to.Ptr[int64](600),
// Wait: to.Ptr(true),
// },
// "srs-kustomization2": &armfluxconfigurations.KustomizationDefinition{
// Name: to.Ptr("srs-kustomization2"),
// Path: to.Ptr("./other/test/path"),
// DependsOn: []*string{
// to.Ptr("srs-kustomization1")},
// PostBuild: &armfluxconfigurations.PostBuildDefinition{
// SubstituteFrom: []*armfluxconfigurations.SubstituteFromDefinition{
// {
// Name: to.Ptr("cluster-values"),
// Kind: to.Ptr("ConfigMap"),
// Optional: to.Ptr(true),
// },
// {
// Name: to.Ptr("secret-name"),
// Kind: to.Ptr("Secret"),
// Optional: to.Ptr(false),
// }},
// },
// Prune: to.Ptr(false),
// RetryIntervalInSeconds: to.Ptr[int64](600),
// SyncIntervalInSeconds: to.Ptr[int64](600),
// TimeoutInSeconds: to.Ptr[int64](600),
// Wait: to.Ptr(false),
// },
// },
// Namespace: to.Ptr("srs-namespace"),
// ProvisioningState: to.Ptr(armfluxconfigurations.ProvisioningStateSucceeded),
// RepositoryPublicKey: to.Ptr("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDiNkrANrhtRy+02Xc7b5bwvgOKvQMbqUQaXeB6FCDkbLaavw/zO/vIhIBEQu+vbBt6IlI/Pui0rMFr5JjA8Vwwd85oabzU07TPzbFvKSU9eCXqWRKWf0DHNQj/kxPJNtyPYFv3lGoiZZ6QzejOxlW/lPPokUePN0oI10daWwqznm2q0Cmh1EgPUYveq3J5KCWncZXCdwY36zWYulCWFaqazoaGy4kxcqlVy+mPjE/UJthaoLm3mq+23uhlmmfCc1j7W6+H6fcOwTyOtcbimxz2Ug8HlTzSTXBPtEe7qyllMyk62EPNUUq4bVoVsex9sKBK6/hW0Cn2P5i5jslUPCQF"),
// Scope: to.Ptr(armfluxconfigurations.ScopeTypeCluster),
// SourceKind: to.Ptr(armfluxconfigurations.SourceKindTypeGitRepository),
// SourceSyncedCommitID: to.Ptr("master/0ba6f0d30760d567de0bac86c8c4eec13ce1a590"),
// SourceUpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-19T18:17:12.000Z"); return t}()),
// StatusUpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-19T18:17:12.000Z"); return t}()),
// Statuses: []*armfluxconfigurations.ObjectStatusDefinition{
// {
// Name: to.Ptr("srs-fluxconfig"),
// ComplianceState: to.Ptr(armfluxconfigurations.FluxComplianceStateCompliant),
// Kind: to.Ptr("GitRepository"),
// StatusConditions: []*armfluxconfigurations.ObjectStatusConditionDefinition{
// {
// Type: to.Ptr("Ready"),
// LastTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-19T18:12:40.000Z"); return t}()),
// Message: to.Ptr("'Fetched revision: master/0ba6f0d30760d567de0bac86c8c4eec13ce1a590'"),
// Reason: to.Ptr("GitOperationSucceed"),
// Status: to.Ptr("True"),
// }},
// },
// {
// Name: to.Ptr("srs-fluxconfig-srs-kustomization1"),
// ComplianceState: to.Ptr(armfluxconfigurations.FluxComplianceStateCompliant),
// HelmReleaseProperties: &armfluxconfigurations.HelmReleasePropertiesDefinition{
// HelmChartRef: &armfluxconfigurations.ObjectReferenceDefinition{
// Name: to.Ptr("myname"),
// Namespace: to.Ptr("mynamespace"),
// },
// LastRevisionApplied: to.Ptr[int64](1),
// },
// Kind: to.Ptr("Kustomization"),
// StatusConditions: []*armfluxconfigurations.ObjectStatusConditionDefinition{
// {
// Type: to.Ptr("Ready"),
// LastTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-19T18:12:40.000Z"); return t}()),
// Message: to.Ptr("'Applied revision: master/0ba6f0d30760d567de0bac86c8c4eec13ce1a590'"),
// Reason: to.Ptr("ReconciliationSucceeded"),
// Status: to.Ptr("True"),
// }},
// },
// {
// Name: to.Ptr("srs-fluxconfig-srs-kustomization2"),
// ComplianceState: to.Ptr(armfluxconfigurations.FluxComplianceStateCompliant),
// HelmReleaseProperties: &armfluxconfigurations.HelmReleasePropertiesDefinition{
// HelmChartRef: &armfluxconfigurations.ObjectReferenceDefinition{
// Name: to.Ptr("myname"),
// Namespace: to.Ptr("mynamespace"),
// },
// LastRevisionApplied: to.Ptr[int64](1),
// },
// Kind: to.Ptr("Kustomization"),
// StatusConditions: []*armfluxconfigurations.ObjectStatusConditionDefinition{
// {
// Type: to.Ptr("Ready"),
// LastTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-19T18:12:40.000Z"); return t}()),
// Message: to.Ptr("'Applied revision: master/0ba6f0d30760d567de0bac86c8c4eec13ce1a590'"),
// Reason: to.Ptr("ReconciliationSucceeded"),
// Status: to.Ptr("True"),
// }},
// }},
// Suspend: to.Ptr(false),
// },
// SystemData: &armfluxconfigurations.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-19T05:10:57.027Z"); return t}()),
// CreatedBy: to.Ptr("string"),
// CreatedByType: to.Ptr(armfluxconfigurations.CreatedByTypeApplication),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-19T05:10:57.027Z"); return t}()),
// LastModifiedBy: to.Ptr("string"),
// LastModifiedByType: to.Ptr(armfluxconfigurations.CreatedByTypeApplication),
// },
// }
}
Output:
Example (CreateFluxConfigurationWithBucketSourceKind) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba0c086df0ebe03a61579485c1c10de0d17804b2/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/fluxConfigurations/stable/2025-04-01/examples/CreateFluxConfigurationWithBucket.json
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kubernetesconfiguration/armfluxconfigurations"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armfluxconfigurations.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewClient().BeginCreateOrUpdate(ctx, "rg1", "Microsoft.Kubernetes", "connectedClusters", "clusterName1", "srs-fluxconfig", armfluxconfigurations.FluxConfiguration{
Properties: &armfluxconfigurations.FluxConfigurationProperties{
Bucket: &armfluxconfigurations.BucketDefinition{
AccessKey: to.Ptr("fluxminiotest"),
BucketName: to.Ptr("flux"),
SyncIntervalInSeconds: to.Ptr[int64](1000),
TimeoutInSeconds: to.Ptr[int64](1000),
URL: to.Ptr("https://fluxminiotest.az.minio.io"),
},
Kustomizations: map[string]*armfluxconfigurations.KustomizationDefinition{
"srs-kustomization1": {
Path: to.Ptr("./test/path"),
DependsOn: []*string{},
SyncIntervalInSeconds: to.Ptr[int64](600),
TimeoutInSeconds: to.Ptr[int64](600),
},
"srs-kustomization2": {
Path: to.Ptr("./other/test/path"),
DependsOn: []*string{
to.Ptr("srs-kustomization1")},
Prune: to.Ptr(false),
RetryIntervalInSeconds: to.Ptr[int64](600),
SyncIntervalInSeconds: to.Ptr[int64](600),
TimeoutInSeconds: to.Ptr[int64](600),
},
},
Namespace: to.Ptr("srs-namespace"),
Scope: to.Ptr(armfluxconfigurations.ScopeTypeCluster),
SourceKind: to.Ptr(armfluxconfigurations.SourceKindTypeBucket),
Suspend: to.Ptr(false),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.FluxConfiguration = armfluxconfigurations.FluxConfiguration{
// Name: to.Ptr("srs-fluxconfig"),
// Type: to.Ptr("Microsoft.KubernetesConfiguration/fluxConfigurations"),
// ID: to.Ptr("/subscriptions/subId1/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/clusterName1/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/srs-fluxconfig"),
// Properties: &armfluxconfigurations.FluxConfigurationProperties{
// Bucket: &armfluxconfigurations.BucketDefinition{
// AccessKey: to.Ptr("fluxminiotest"),
// BucketName: to.Ptr("flux"),
// SyncIntervalInSeconds: to.Ptr[int64](1000),
// TimeoutInSeconds: to.Ptr[int64](1000),
// URL: to.Ptr("https://fluxminiotest.az.minio.io"),
// },
// ComplianceState: to.Ptr(armfluxconfigurations.FluxComplianceStateCompliant),
// ErrorMessage: to.Ptr(""),
// Kustomizations: map[string]*armfluxconfigurations.KustomizationDefinition{
// "srs-kustomization1": &armfluxconfigurations.KustomizationDefinition{
// Name: to.Ptr("srs-kustomization1"),
// Path: to.Ptr("./test/path"),
// DependsOn: []*string{
// },
// SyncIntervalInSeconds: to.Ptr[int64](600),
// TimeoutInSeconds: to.Ptr[int64](600),
// },
// "srs-kustomization2": &armfluxconfigurations.KustomizationDefinition{
// Name: to.Ptr("srs-kustomization2"),
// Path: to.Ptr("./other/test/path"),
// DependsOn: []*string{
// to.Ptr("srs-kustomization1")},
// Prune: to.Ptr(false),
// RetryIntervalInSeconds: to.Ptr[int64](600),
// SyncIntervalInSeconds: to.Ptr[int64](600),
// TimeoutInSeconds: to.Ptr[int64](600),
// },
// },
// Namespace: to.Ptr("srs-namespace"),
// ProvisioningState: to.Ptr(armfluxconfigurations.ProvisioningStateSucceeded),
// RepositoryPublicKey: to.Ptr(""),
// Scope: to.Ptr(armfluxconfigurations.ScopeTypeCluster),
// SourceKind: to.Ptr(armfluxconfigurations.SourceKindTypeBucket),
// SourceSyncedCommitID: to.Ptr("0ba6f0d30760d567de0bac86c8c4eec13ce1a590"),
// SourceUpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-19T18:17:12.000Z"); return t}()),
// StatusUpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-19T18:17:12.000Z"); return t}()),
// Statuses: []*armfluxconfigurations.ObjectStatusDefinition{
// {
// Name: to.Ptr("srs-fluxconfig"),
// ComplianceState: to.Ptr(armfluxconfigurations.FluxComplianceStateCompliant),
// Kind: to.Ptr("Bucket"),
// StatusConditions: []*armfluxconfigurations.ObjectStatusConditionDefinition{
// {
// Type: to.Ptr("Ready"),
// LastTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-05-04T07:17:30.000Z"); return t}()),
// Message: to.Ptr("stored artifact for revision '55396be14f18fa2b977c1f22becef26a94d1d9a7ccb1e19d12f9cac52d757a84'"),
// Reason: to.Ptr("Succeeded"),
// Status: to.Ptr("True"),
// }},
// },
// {
// Name: to.Ptr("srs-fluxconfig-srs-kustomization1"),
// ComplianceState: to.Ptr(armfluxconfigurations.FluxComplianceStateCompliant),
// HelmReleaseProperties: &armfluxconfigurations.HelmReleasePropertiesDefinition{
// HelmChartRef: &armfluxconfigurations.ObjectReferenceDefinition{
// Name: to.Ptr("myname"),
// Namespace: to.Ptr("mynamespace"),
// },
// LastRevisionApplied: to.Ptr[int64](1),
// },
// Kind: to.Ptr("Kustomization"),
// StatusConditions: []*armfluxconfigurations.ObjectStatusConditionDefinition{
// {
// Type: to.Ptr("Ready"),
// LastTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-19T18:12:40.000Z"); return t}()),
// Message: to.Ptr("'Applied revision: 0ba6f0d30760d567de0bac86c8c4eec13ce1a590'"),
// Reason: to.Ptr("ReconciliationSucceeded"),
// Status: to.Ptr("True"),
// }},
// },
// {
// Name: to.Ptr("srs-fluxconfig-srs-kustomization2"),
// ComplianceState: to.Ptr(armfluxconfigurations.FluxComplianceStateCompliant),
// HelmReleaseProperties: &armfluxconfigurations.HelmReleasePropertiesDefinition{
// HelmChartRef: &armfluxconfigurations.ObjectReferenceDefinition{
// Name: to.Ptr("myname"),
// Namespace: to.Ptr("mynamespace"),
// },
// LastRevisionApplied: to.Ptr[int64](1),
// },
// Kind: to.Ptr("Kustomization"),
// StatusConditions: []*armfluxconfigurations.ObjectStatusConditionDefinition{
// {
// Type: to.Ptr("Ready"),
// LastTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-19T18:12:40.000Z"); return t}()),
// Message: to.Ptr("'Applied revision: 0ba6f0d30760d567de0bac86c8c4eec13ce1a590'"),
// Reason: to.Ptr("ReconciliationSucceeded"),
// Status: to.Ptr("True"),
// }},
// }},
// Suspend: to.Ptr(false),
// },
// SystemData: &armfluxconfigurations.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-19T05:10:57.027Z"); return t}()),
// CreatedBy: to.Ptr("string"),
// CreatedByType: to.Ptr(armfluxconfigurations.CreatedByTypeApplication),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-19T05:10:57.027Z"); return t}()),
// LastModifiedBy: to.Ptr("string"),
// LastModifiedByType: to.Ptr(armfluxconfigurations.CreatedByTypeApplication),
// },
// }
}
Output:
Example (CreateFluxConfigurationWithGitRepositoryProvider) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba0c086df0ebe03a61579485c1c10de0d17804b2/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/fluxConfigurations/stable/2025-04-01/examples/CreateFluxConfigurationWithProvider.json
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kubernetesconfiguration/armfluxconfigurations"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armfluxconfigurations.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewClient().BeginCreateOrUpdate(ctx, "rg1", "Microsoft.Kubernetes", "connectedClusters", "clusterName1", "srs-fluxconfig", armfluxconfigurations.FluxConfiguration{
Properties: &armfluxconfigurations.FluxConfigurationProperties{
GitRepository: &armfluxconfigurations.GitRepositoryDefinition{
HTTPSCACert: to.Ptr("ZXhhbXBsZWNlcnRpZmljYXRl"),
Provider: to.Ptr(armfluxconfigurations.ProviderTypeAzure),
RepositoryRef: &armfluxconfigurations.RepositoryRefDefinition{
Branch: to.Ptr("master"),
},
SyncIntervalInSeconds: to.Ptr[int64](600),
TimeoutInSeconds: to.Ptr[int64](600),
URL: to.Ptr("https://dev.azure.com/org/proj/_git/arc-k8s-demo"),
},
Kustomizations: map[string]*armfluxconfigurations.KustomizationDefinition{
"srs-kustomization1": {
Path: to.Ptr("./test/path"),
DependsOn: []*string{},
PostBuild: &armfluxconfigurations.PostBuildDefinition{
Substitute: map[string]*string{
"cluster_env": to.Ptr("prod"),
"replica_count": to.Ptr("2"),
},
SubstituteFrom: []*armfluxconfigurations.SubstituteFromDefinition{
{
Name: to.Ptr("cluster-test"),
Kind: to.Ptr("ConfigMap"),
Optional: to.Ptr(true),
}},
},
SyncIntervalInSeconds: to.Ptr[int64](600),
TimeoutInSeconds: to.Ptr[int64](600),
Wait: to.Ptr(true),
},
"srs-kustomization2": {
Path: to.Ptr("./other/test/path"),
DependsOn: []*string{
to.Ptr("srs-kustomization1")},
PostBuild: &armfluxconfigurations.PostBuildDefinition{
SubstituteFrom: []*armfluxconfigurations.SubstituteFromDefinition{
{
Name: to.Ptr("cluster-values"),
Kind: to.Ptr("ConfigMap"),
Optional: to.Ptr(true),
},
{
Name: to.Ptr("secret-name"),
Kind: to.Ptr("Secret"),
Optional: to.Ptr(false),
}},
},
Prune: to.Ptr(false),
RetryIntervalInSeconds: to.Ptr[int64](600),
SyncIntervalInSeconds: to.Ptr[int64](600),
TimeoutInSeconds: to.Ptr[int64](600),
Wait: to.Ptr(false),
},
},
Namespace: to.Ptr("srs-namespace"),
ReconciliationWaitDuration: to.Ptr("PT30M"),
Scope: to.Ptr(armfluxconfigurations.ScopeTypeCluster),
SourceKind: to.Ptr(armfluxconfigurations.SourceKindTypeGitRepository),
Suspend: to.Ptr(false),
WaitForReconciliation: to.Ptr(true),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.FluxConfiguration = armfluxconfigurations.FluxConfiguration{
// Name: to.Ptr("srs-fluxconfig"),
// Type: to.Ptr("Microsoft.KubernetesConfiguration/fluxConfigurations"),
// ID: to.Ptr("/subscriptions/subId1/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/clusterName1/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/srs-fluxconfig"),
// Properties: &armfluxconfigurations.FluxConfigurationProperties{
// ComplianceState: to.Ptr(armfluxconfigurations.FluxComplianceStateCompliant),
// ErrorMessage: to.Ptr(""),
// GitRepository: &armfluxconfigurations.GitRepositoryDefinition{
// HTTPSCACert: to.Ptr("ZXhhbXBsZWNlcnRpZmljYXRl"),
// RepositoryRef: &armfluxconfigurations.RepositoryRefDefinition{
// Branch: to.Ptr("master"),
// },
// SyncIntervalInSeconds: to.Ptr[int64](600),
// TimeoutInSeconds: to.Ptr[int64](600),
// URL: to.Ptr("https://github.com/Azure/arc-k8s-demo"),
// },
// Kustomizations: map[string]*armfluxconfigurations.KustomizationDefinition{
// "srs-kustomization1": &armfluxconfigurations.KustomizationDefinition{
// Name: to.Ptr("srs-kustomization1"),
// Path: to.Ptr("./test/path"),
// DependsOn: []*string{
// },
// PostBuild: &armfluxconfigurations.PostBuildDefinition{
// Substitute: map[string]*string{
// "cluster_env": to.Ptr("prod"),
// "replica_count": to.Ptr("2"),
// },
// SubstituteFrom: []*armfluxconfigurations.SubstituteFromDefinition{
// {
// Name: to.Ptr("cluster-test"),
// Kind: to.Ptr("ConfigMap"),
// Optional: to.Ptr(true),
// }},
// },
// SyncIntervalInSeconds: to.Ptr[int64](600),
// TimeoutInSeconds: to.Ptr[int64](600),
// Wait: to.Ptr(true),
// },
// "srs-kustomization2": &armfluxconfigurations.KustomizationDefinition{
// Name: to.Ptr("srs-kustomization2"),
// Path: to.Ptr("./other/test/path"),
// DependsOn: []*string{
// to.Ptr("srs-kustomization1")},
// PostBuild: &armfluxconfigurations.PostBuildDefinition{
// SubstituteFrom: []*armfluxconfigurations.SubstituteFromDefinition{
// {
// Name: to.Ptr("cluster-values"),
// Kind: to.Ptr("ConfigMap"),
// Optional: to.Ptr(true),
// },
// {
// Name: to.Ptr("secret-name"),
// Kind: to.Ptr("Secret"),
// Optional: to.Ptr(false),
// }},
// },
// Prune: to.Ptr(false),
// RetryIntervalInSeconds: to.Ptr[int64](600),
// SyncIntervalInSeconds: to.Ptr[int64](600),
// TimeoutInSeconds: to.Ptr[int64](600),
// Wait: to.Ptr(false),
// },
// },
// Namespace: to.Ptr("srs-namespace"),
// ProvisioningState: to.Ptr(armfluxconfigurations.ProvisioningStateSucceeded),
// RepositoryPublicKey: to.Ptr("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDiNkrANrhtRy+02Xc7b5bwvgOKvQMbqUQaXeB6FCDkbLaavw/zO/vIhIBEQu+vbBt6IlI/Pui0rMFr5JjA8Vwwd85oabzU07TPzbFvKSU9eCXqWRKWf0DHNQj/kxPJNtyPYFv3lGoiZZ6QzejOxlW/lPPokUePN0oI10daWwqznm2q0Cmh1EgPUYveq3J5KCWncZXCdwY36zWYulCWFaqazoaGy4kxcqlVy+mPjE/UJthaoLm3mq+23uhlmmfCc1j7W6+H6fcOwTyOtcbimxz2Ug8HlTzSTXBPtEe7qyllMyk62EPNUUq4bVoVsex9sKBK6/hW0Cn2P5i5jslUPCQF"),
// Scope: to.Ptr(armfluxconfigurations.ScopeTypeCluster),
// SourceKind: to.Ptr(armfluxconfigurations.SourceKindTypeGitRepository),
// SourceSyncedCommitID: to.Ptr("master/0ba6f0d30760d567de0bac86c8c4eec13ce1a590"),
// SourceUpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-19T18:17:12.000Z"); return t}()),
// StatusUpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-19T18:17:12.000Z"); return t}()),
// Statuses: []*armfluxconfigurations.ObjectStatusDefinition{
// {
// Name: to.Ptr("srs-fluxconfig"),
// ComplianceState: to.Ptr(armfluxconfigurations.FluxComplianceStateCompliant),
// Kind: to.Ptr("GitRepository"),
// StatusConditions: []*armfluxconfigurations.ObjectStatusConditionDefinition{
// {
// Type: to.Ptr("Ready"),
// LastTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-19T18:12:40.000Z"); return t}()),
// Message: to.Ptr("'Fetched revision: master/0ba6f0d30760d567de0bac86c8c4eec13ce1a590'"),
// Reason: to.Ptr("GitOperationSucceed"),
// Status: to.Ptr("True"),
// }},
// },
// {
// Name: to.Ptr("srs-fluxconfig-srs-kustomization1"),
// ComplianceState: to.Ptr(armfluxconfigurations.FluxComplianceStateCompliant),
// HelmReleaseProperties: &armfluxconfigurations.HelmReleasePropertiesDefinition{
// HelmChartRef: &armfluxconfigurations.ObjectReferenceDefinition{
// Name: to.Ptr("myname"),
// Namespace: to.Ptr("mynamespace"),
// },
// LastRevisionApplied: to.Ptr[int64](1),
// },
// Kind: to.Ptr("Kustomization"),
// StatusConditions: []*armfluxconfigurations.ObjectStatusConditionDefinition{
// {
// Type: to.Ptr("Ready"),
// LastTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-19T18:12:40.000Z"); return t}()),
// Message: to.Ptr("'Applied revision: master/0ba6f0d30760d567de0bac86c8c4eec13ce1a590'"),
// Reason: to.Ptr("ReconciliationSucceeded"),
// Status: to.Ptr("True"),
// }},
// },
// {
// Name: to.Ptr("srs-fluxconfig-srs-kustomization2"),
// ComplianceState: to.Ptr(armfluxconfigurations.FluxComplianceStateCompliant),
// HelmReleaseProperties: &armfluxconfigurations.HelmReleasePropertiesDefinition{
// HelmChartRef: &armfluxconfigurations.ObjectReferenceDefinition{
// Name: to.Ptr("myname"),
// Namespace: to.Ptr("mynamespace"),
// },
// LastRevisionApplied: to.Ptr[int64](1),
// },
// Kind: to.Ptr("Kustomization"),
// StatusConditions: []*armfluxconfigurations.ObjectStatusConditionDefinition{
// {
// Type: to.Ptr("Ready"),
// LastTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-19T18:12:40.000Z"); return t}()),
// Message: to.Ptr("'Applied revision: master/0ba6f0d30760d567de0bac86c8c4eec13ce1a590'"),
// Reason: to.Ptr("ReconciliationSucceeded"),
// Status: to.Ptr("True"),
// }},
// }},
// Suspend: to.Ptr(false),
// },
// SystemData: &armfluxconfigurations.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-19T05:10:57.027Z"); return t}()),
// CreatedBy: to.Ptr("string"),
// CreatedByType: to.Ptr(armfluxconfigurations.CreatedByTypeApplication),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-19T05:10:57.027Z"); return t}()),
// LastModifiedBy: to.Ptr("string"),
// LastModifiedByType: to.Ptr(armfluxconfigurations.CreatedByTypeApplication),
// },
// }
}
Output:
Example (CreateFluxConfigurationWithOciRepositorySourceKind) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba0c086df0ebe03a61579485c1c10de0d17804b2/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/fluxConfigurations/stable/2025-04-01/examples/CreateFluxConfigurationWithOCIRepository.json
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kubernetesconfiguration/armfluxconfigurations"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armfluxconfigurations.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewClient().BeginCreateOrUpdate(ctx, "rg1", "Microsoft.Kubernetes", "connectedClusters", "clusterName1", "srs-fluxconfig", armfluxconfigurations.FluxConfiguration{
Properties: &armfluxconfigurations.FluxConfigurationProperties{
Kustomizations: map[string]*armfluxconfigurations.KustomizationDefinition{
"srs-kustomization1": {
Path: to.Ptr("./test/path"),
DependsOn: []*string{},
SyncIntervalInSeconds: to.Ptr[int64](600),
TimeoutInSeconds: to.Ptr[int64](600),
},
"srs-kustomization2": {
Path: to.Ptr("./other/test/path"),
DependsOn: []*string{
to.Ptr("srs-kustomization1")},
Prune: to.Ptr(false),
RetryIntervalInSeconds: to.Ptr[int64](600),
SyncIntervalInSeconds: to.Ptr[int64](600),
TimeoutInSeconds: to.Ptr[int64](600),
},
},
Namespace: to.Ptr("srs-namespace"),
OciRepository: &armfluxconfigurations.OCIRepositoryDefinition{
ServiceAccountName: to.Ptr("testserviceaccount"),
SyncIntervalInSeconds: to.Ptr[int64](1000),
TimeoutInSeconds: to.Ptr[int64](1000),
URL: to.Ptr("oci://ghcr.io/stefanprodan/manifests/podinfo"),
},
Scope: to.Ptr(armfluxconfigurations.ScopeTypeCluster),
SourceKind: to.Ptr(armfluxconfigurations.SourceKindTypeOCIRepository),
Suspend: to.Ptr(false),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.FluxConfiguration = armfluxconfigurations.FluxConfiguration{
// Name: to.Ptr("srs-fluxconfig"),
// Type: to.Ptr("Microsoft.KubernetesConfiguration/fluxConfigurations"),
// ID: to.Ptr("/subscriptions/subId1/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/clusterName1/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/srs-fluxconfig"),
// Properties: &armfluxconfigurations.FluxConfigurationProperties{
// ComplianceState: to.Ptr(armfluxconfigurations.FluxComplianceStateCompliant),
// ErrorMessage: to.Ptr(""),
// Kustomizations: map[string]*armfluxconfigurations.KustomizationDefinition{
// "srs-kustomization1": &armfluxconfigurations.KustomizationDefinition{
// Name: to.Ptr("srs-kustomization1"),
// Path: to.Ptr("./test/path"),
// DependsOn: []*string{
// },
// SyncIntervalInSeconds: to.Ptr[int64](600),
// TimeoutInSeconds: to.Ptr[int64](600),
// },
// "srs-kustomization2": &armfluxconfigurations.KustomizationDefinition{
// Name: to.Ptr("srs-kustomization2"),
// Path: to.Ptr("./other/test/path"),
// DependsOn: []*string{
// to.Ptr("srs-kustomization1")},
// Prune: to.Ptr(false),
// RetryIntervalInSeconds: to.Ptr[int64](600),
// SyncIntervalInSeconds: to.Ptr[int64](600),
// TimeoutInSeconds: to.Ptr[int64](600),
// },
// },
// Namespace: to.Ptr("srs-namespace"),
// OciRepository: &armfluxconfigurations.OCIRepositoryDefinition{
// ServiceAccountName: to.Ptr("testserviceaccount"),
// SyncIntervalInSeconds: to.Ptr[int64](1000),
// TimeoutInSeconds: to.Ptr[int64](1000),
// URL: to.Ptr("oci://ghcr.io/stefanprodan/manifests/podinfo"),
// },
// ProvisioningState: to.Ptr(armfluxconfigurations.ProvisioningStateSucceeded),
// RepositoryPublicKey: to.Ptr(""),
// Scope: to.Ptr(armfluxconfigurations.ScopeTypeCluster),
// SourceKind: to.Ptr(armfluxconfigurations.SourceKindTypeOCIRepository),
// SourceSyncedCommitID: to.Ptr("0ba6f0d30760d567de0bac86c8c4eec13ce1a590"),
// SourceUpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-19T18:17:12.000Z"); return t}()),
// StatusUpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-19T18:17:12.000Z"); return t}()),
// Statuses: []*armfluxconfigurations.ObjectStatusDefinition{
// {
// Name: to.Ptr("srs-fluxconfig"),
// ComplianceState: to.Ptr(armfluxconfigurations.FluxComplianceStateCompliant),
// Kind: to.Ptr("OCIRepository"),
// StatusConditions: []*armfluxconfigurations.ObjectStatusConditionDefinition{
// {
// Type: to.Ptr("Ready"),
// LastTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-05-04T07:17:30.000Z"); return t}()),
// Message: to.Ptr("stored artifact for revision '55396be14f18fa2b977c1f22becef26a94d1d9a7ccb1e19d12f9cac52d757a84'"),
// Reason: to.Ptr("Succeeded"),
// Status: to.Ptr("True"),
// }},
// },
// {
// Name: to.Ptr("srs-fluxconfig-srs-kustomization1"),
// ComplianceState: to.Ptr(armfluxconfigurations.FluxComplianceStateCompliant),
// HelmReleaseProperties: &armfluxconfigurations.HelmReleasePropertiesDefinition{
// HelmChartRef: &armfluxconfigurations.ObjectReferenceDefinition{
// Name: to.Ptr("myname"),
// Namespace: to.Ptr("mynamespace"),
// },
// LastRevisionApplied: to.Ptr[int64](1),
// },
// Kind: to.Ptr("Kustomization"),
// StatusConditions: []*armfluxconfigurations.ObjectStatusConditionDefinition{
// {
// Type: to.Ptr("Ready"),
// LastTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-19T18:12:40.000Z"); return t}()),
// Message: to.Ptr("'Applied revision: 0ba6f0d30760d567de0bac86c8c4eec13ce1a590'"),
// Reason: to.Ptr("ReconciliationSucceeded"),
// Status: to.Ptr("True"),
// }},
// },
// {
// Name: to.Ptr("srs-fluxconfig-srs-kustomization2"),
// ComplianceState: to.Ptr(armfluxconfigurations.FluxComplianceStateCompliant),
// HelmReleaseProperties: &armfluxconfigurations.HelmReleasePropertiesDefinition{
// HelmChartRef: &armfluxconfigurations.ObjectReferenceDefinition{
// Name: to.Ptr("myname"),
// Namespace: to.Ptr("mynamespace"),
// },
// LastRevisionApplied: to.Ptr[int64](1),
// },
// Kind: to.Ptr("Kustomization"),
// StatusConditions: []*armfluxconfigurations.ObjectStatusConditionDefinition{
// {
// Type: to.Ptr("Ready"),
// LastTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-19T18:12:40.000Z"); return t}()),
// Message: to.Ptr("'Applied revision: 0ba6f0d30760d567de0bac86c8c4eec13ce1a590'"),
// Reason: to.Ptr("ReconciliationSucceeded"),
// Status: to.Ptr("True"),
// }},
// }},
// Suspend: to.Ptr(false),
// },
// SystemData: &armfluxconfigurations.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-19T05:10:57.027Z"); return t}()),
// CreatedBy: to.Ptr("string"),
// CreatedByType: to.Ptr(armfluxconfigurations.CreatedByTypeApplication),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-19T05:10:57.027Z"); return t}()),
// LastModifiedBy: to.Ptr("string"),
// LastModifiedByType: to.Ptr(armfluxconfigurations.CreatedByTypeApplication),
// },
// }
}
Output:
func (*Client) BeginDelete ¶
func (client *Client) BeginDelete(ctx context.Context, resourceGroupName string, clusterRp string, clusterResourceName string, clusterName string, fluxConfigurationName string, options *ClientBeginDeleteOptions) (*runtime.Poller[ClientDeleteResponse], error)
BeginDelete - This will delete the YAML file used to set up the Flux Configuration, thus stopping future sync from the source repo. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2025-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterRp - The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.
- clusterResourceName - The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters, appliances.
- clusterName - The name of the kubernetes cluster.
- fluxConfigurationName - Name of the Flux Configuration.
- options - ClientBeginDeleteOptions contains the optional parameters for the Client.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba0c086df0ebe03a61579485c1c10de0d17804b2/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/fluxConfigurations/stable/2025-04-01/examples/DeleteFluxConfiguration.json
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kubernetesconfiguration/armfluxconfigurations"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armfluxconfigurations.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewClient().BeginDelete(ctx, "rg1", "Microsoft.Kubernetes", "connectedClusters", "clusterName1", "srs-fluxconfig", &armfluxconfigurations.ClientBeginDeleteOptions{ForceDelete: nil})
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
}
Output:
func (*Client) BeginUpdate ¶
func (client *Client) BeginUpdate(ctx context.Context, resourceGroupName string, clusterRp string, clusterResourceName string, clusterName string, fluxConfigurationName string, fluxConfigurationPatch FluxConfigurationPatch, options *ClientBeginUpdateOptions) (*runtime.Poller[ClientUpdateResponse], error)
BeginUpdate - Update an existing Kubernetes Flux Configuration. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2025-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterRp - The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.
- clusterResourceName - The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters, appliances.
- clusterName - The name of the kubernetes cluster.
- fluxConfigurationName - Name of the Flux Configuration.
- fluxConfigurationPatch - Properties to Patch in an existing Flux Configuration.
- options - ClientBeginUpdateOptions contains the optional parameters for the Client.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba0c086df0ebe03a61579485c1c10de0d17804b2/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/fluxConfigurations/stable/2025-04-01/examples/PatchFluxConfiguration.json
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kubernetesconfiguration/armfluxconfigurations"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armfluxconfigurations.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewClient().BeginUpdate(ctx, "rg1", "Microsoft.Kubernetes", "connectedClusters", "clusterName1", "srs-fluxconfig", armfluxconfigurations.FluxConfigurationPatch{
Properties: &armfluxconfigurations.FluxConfigurationPatchProperties{
GitRepository: &armfluxconfigurations.GitRepositoryPatchDefinition{
URL: to.Ptr("https://github.com/jonathan-innis/flux2-kustomize-helm-example.git"),
},
Kustomizations: map[string]*armfluxconfigurations.KustomizationPatchDefinition{
"srs-kustomization1": nil,
"srs-kustomization2": {
Path: to.Ptr("./test/alt-path"),
SyncIntervalInSeconds: to.Ptr[int64](300),
},
"srs-kustomization3": {
Path: to.Ptr("./test/another-path"),
SyncIntervalInSeconds: to.Ptr[int64](300),
},
},
Suspend: to.Ptr(true),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.FluxConfiguration = armfluxconfigurations.FluxConfiguration{
// Properties: &armfluxconfigurations.FluxConfigurationProperties{
// ComplianceState: to.Ptr(armfluxconfigurations.FluxComplianceStateCompliant),
// ErrorMessage: to.Ptr(""),
// GitRepository: &armfluxconfigurations.GitRepositoryDefinition{
// RepositoryRef: &armfluxconfigurations.RepositoryRefDefinition{
// Branch: to.Ptr("master"),
// },
// SyncIntervalInSeconds: to.Ptr[int64](600),
// TimeoutInSeconds: to.Ptr[int64](600),
// URL: to.Ptr("https://github.com/jonathan-innis/flux2-kustomize-helm-example.git"),
// },
// Kustomizations: map[string]*armfluxconfigurations.KustomizationDefinition{
// "srs-kustomization2": &armfluxconfigurations.KustomizationDefinition{
// Path: to.Ptr("./test/alt-path"),
// Prune: to.Ptr(false),
// RetryIntervalInSeconds: to.Ptr[int64](600),
// SyncIntervalInSeconds: to.Ptr[int64](300),
// TimeoutInSeconds: to.Ptr[int64](600),
// },
// "srs-kustomization3": &armfluxconfigurations.KustomizationDefinition{
// Path: to.Ptr("./test/another-path"),
// Prune: to.Ptr(false),
// SyncIntervalInSeconds: to.Ptr[int64](300),
// TimeoutInSeconds: to.Ptr[int64](600),
// },
// },
// Namespace: to.Ptr("srs-namespace"),
// ProvisioningState: to.Ptr(armfluxconfigurations.ProvisioningStateSucceeded),
// RepositoryPublicKey: to.Ptr("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDiNkrANrhtRy+02Xc7b5bwvgOKvQMbqUQaXeB6FCDkbLaavw/zO/vIhIBEQu+vbBt6IlI/Pui0rMFr5JjA8Vwwd85oabzU07TPzbFvKSU9eCXqWRKWf0DHNQj/kxPJNtyPYFv3lGoiZZ6QzejOxlW/lPPokUePN0oI10daWwqznm2q0Cmh1EgPUYveq3J5KCWncZXCdwY36zWYulCWFaqazoaGy4kxcqlVy+mPjE/UJthaoLm3mq+23uhlmmfCc1j7W6+H6fcOwTyOtcbimxz2Ug8HlTzSTXBPtEe7qyllMyk62EPNUUq4bVoVsex9sKBK6/hW0Cn2P5i5jslUPCQF"),
// Scope: to.Ptr(armfluxconfigurations.ScopeTypeCluster),
// SourceKind: to.Ptr(armfluxconfigurations.SourceKindTypeGitRepository),
// SourceSyncedCommitID: to.Ptr("master/0ba6f0d30760d567de0bac86c8c4eec13ce1a590"),
// SourceUpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-19T18:17:12.000Z"); return t}()),
// StatusUpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-19T18:17:12.000Z"); return t}()),
// Statuses: []*armfluxconfigurations.ObjectStatusDefinition{
// {
// Name: to.Ptr("srs-fluxconfig"),
// ComplianceState: to.Ptr(armfluxconfigurations.FluxComplianceStateCompliant),
// Kind: to.Ptr("GitRepository"),
// StatusConditions: []*armfluxconfigurations.ObjectStatusConditionDefinition{
// {
// Type: to.Ptr("Ready"),
// LastTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-19T18:12:40.000Z"); return t}()),
// Message: to.Ptr("'Fetched revision: master/0ba6f0d30760d567de0bac86c8c4eec13ce1a590'"),
// Reason: to.Ptr("GitOperationSucceed"),
// Status: to.Ptr("True"),
// }},
// },
// {
// Name: to.Ptr("srs-fluxconfig-srs-kustomization1"),
// ComplianceState: to.Ptr(armfluxconfigurations.FluxComplianceStateCompliant),
// HelmReleaseProperties: &armfluxconfigurations.HelmReleasePropertiesDefinition{
// HelmChartRef: &armfluxconfigurations.ObjectReferenceDefinition{
// Name: to.Ptr("myname"),
// Namespace: to.Ptr("mynamespace"),
// },
// LastRevisionApplied: to.Ptr[int64](1),
// },
// Kind: to.Ptr("Kustomization"),
// StatusConditions: []*armfluxconfigurations.ObjectStatusConditionDefinition{
// {
// Type: to.Ptr("Ready"),
// LastTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-19T18:12:40.000Z"); return t}()),
// Message: to.Ptr("'Applied revision: master/0ba6f0d30760d567de0bac86c8c4eec13ce1a590'"),
// Reason: to.Ptr("ReconciliationSucceeded"),
// Status: to.Ptr("True"),
// }},
// },
// {
// Name: to.Ptr("srs-fluxconfig-srs-kustomization2"),
// ComplianceState: to.Ptr(armfluxconfigurations.FluxComplianceStateCompliant),
// HelmReleaseProperties: &armfluxconfigurations.HelmReleasePropertiesDefinition{
// HelmChartRef: &armfluxconfigurations.ObjectReferenceDefinition{
// Name: to.Ptr("myname"),
// Namespace: to.Ptr("mynamespace"),
// },
// LastRevisionApplied: to.Ptr[int64](1),
// },
// Kind: to.Ptr("Kustomization"),
// StatusConditions: []*armfluxconfigurations.ObjectStatusConditionDefinition{
// {
// Type: to.Ptr("Ready"),
// LastTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-19T18:12:40.000Z"); return t}()),
// Message: to.Ptr("'Applied revision: master/0ba6f0d30760d567de0bac86c8c4eec13ce1a590'"),
// Reason: to.Ptr("ReconciliationSucceeded"),
// Status: to.Ptr("True"),
// }},
// }},
// Suspend: to.Ptr(false),
// },
// }
}
Output:
func (*Client) Get ¶
func (client *Client) Get(ctx context.Context, resourceGroupName string, clusterRp string, clusterResourceName string, clusterName string, fluxConfigurationName string, options *ClientGetOptions) (ClientGetResponse, error)
Get - Gets details of the Flux Configuration. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2025-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterRp - The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.
- clusterResourceName - The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters, appliances.
- clusterName - The name of the kubernetes cluster.
- fluxConfigurationName - Name of the Flux Configuration.
- options - ClientGetOptions contains the optional parameters for the Client.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba0c086df0ebe03a61579485c1c10de0d17804b2/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/fluxConfigurations/stable/2025-04-01/examples/GetFluxConfiguration.json
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kubernetesconfiguration/armfluxconfigurations"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armfluxconfigurations.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewClient().Get(ctx, "rg1", "Microsoft.Kubernetes", "connectedClusters", "clusterName1", "srs-fluxconfig", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.FluxConfiguration = armfluxconfigurations.FluxConfiguration{
// Name: to.Ptr("srs-fluxconfig"),
// Type: to.Ptr("Microsoft.KubernetesConfiguration/fluxConfigurations"),
// ID: to.Ptr("/subscriptions/subId1/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/clusterName1/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/srs-fluxconfig"),
// Properties: &armfluxconfigurations.FluxConfigurationProperties{
// ComplianceState: to.Ptr(armfluxconfigurations.FluxComplianceStateCompliant),
// ErrorMessage: to.Ptr(""),
// GitRepository: &armfluxconfigurations.GitRepositoryDefinition{
// RepositoryRef: &armfluxconfigurations.RepositoryRefDefinition{
// Branch: to.Ptr("master"),
// },
// SyncIntervalInSeconds: to.Ptr[int64](600),
// TimeoutInSeconds: to.Ptr[int64](600),
// URL: to.Ptr("https://github.com/Azure/arc-k8s-demo"),
// },
// Kustomizations: map[string]*armfluxconfigurations.KustomizationDefinition{
// "srs-kustomization1": &armfluxconfigurations.KustomizationDefinition{
// Name: to.Ptr("srs-kustomization1"),
// Path: to.Ptr("./test/path"),
// DependsOn: []*string{
// },
// PostBuild: &armfluxconfigurations.PostBuildDefinition{
// Substitute: map[string]*string{
// "cluster_env": to.Ptr("prod"),
// "replica_count": to.Ptr("2"),
// },
// SubstituteFrom: []*armfluxconfigurations.SubstituteFromDefinition{
// {
// Name: to.Ptr("cluster-test"),
// Kind: to.Ptr("ConfigMap"),
// Optional: to.Ptr(true),
// }},
// },
// SyncIntervalInSeconds: to.Ptr[int64](600),
// TimeoutInSeconds: to.Ptr[int64](600),
// Wait: to.Ptr(true),
// },
// "srs-kustomization2": &armfluxconfigurations.KustomizationDefinition{
// Name: to.Ptr("srs-kustomization2"),
// Path: to.Ptr("./other/test/path"),
// DependsOn: []*string{
// to.Ptr("srs-kustomization1")},
// PostBuild: &armfluxconfigurations.PostBuildDefinition{
// SubstituteFrom: []*armfluxconfigurations.SubstituteFromDefinition{
// {
// Name: to.Ptr("cluster-values"),
// Kind: to.Ptr("ConfigMap"),
// Optional: to.Ptr(true),
// },
// {
// Name: to.Ptr("secret-name"),
// Kind: to.Ptr("Secret"),
// Optional: to.Ptr(false),
// }},
// },
// Prune: to.Ptr(false),
// RetryIntervalInSeconds: to.Ptr[int64](600),
// SyncIntervalInSeconds: to.Ptr[int64](600),
// TimeoutInSeconds: to.Ptr[int64](600),
// Wait: to.Ptr(false),
// },
// },
// Namespace: to.Ptr("srs-namespace"),
// ProvisioningState: to.Ptr(armfluxconfigurations.ProvisioningStateSucceeded),
// RepositoryPublicKey: to.Ptr("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDiNkrANrhtRy+02Xc7b5bwvgOKvQMbqUQaXeB6FCDkbLaavw/zO/vIhIBEQu+vbBt6IlI/Pui0rMFr5JjA8Vwwd85oabzU07TPzbFvKSU9eCXqWRKWf0DHNQj/kxPJNtyPYFv3lGoiZZ6QzejOxlW/lPPokUePN0oI10daWwqznm2q0Cmh1EgPUYveq3J5KCWncZXCdwY36zWYulCWFaqazoaGy4kxcqlVy+mPjE/UJthaoLm3mq+23uhlmmfCc1j7W6+H6fcOwTyOtcbimxz2Ug8HlTzSTXBPtEe7qyllMyk62EPNUUq4bVoVsex9sKBK6/hW0Cn2P5i5jslUPCQF"),
// Scope: to.Ptr(armfluxconfigurations.ScopeTypeCluster),
// SourceKind: to.Ptr(armfluxconfigurations.SourceKindTypeGitRepository),
// SourceSyncedCommitID: to.Ptr("master/0ba6f0d30760d567de0bac86c8c4eec13ce1a590"),
// SourceUpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-19T18:17:12.000Z"); return t}()),
// StatusUpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-19T18:17:12.000Z"); return t}()),
// Statuses: []*armfluxconfigurations.ObjectStatusDefinition{
// {
// Name: to.Ptr("srs-fluxconfig"),
// ComplianceState: to.Ptr(armfluxconfigurations.FluxComplianceStateCompliant),
// Kind: to.Ptr("GitRepository"),
// StatusConditions: []*armfluxconfigurations.ObjectStatusConditionDefinition{
// {
// Type: to.Ptr("Ready"),
// LastTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-19T18:12:40.000Z"); return t}()),
// Message: to.Ptr("'Fetched revision: master/0ba6f0d30760d567de0bac86c8c4eec13ce1a590'"),
// Reason: to.Ptr("GitOperationSucceed"),
// Status: to.Ptr("True"),
// }},
// },
// {
// Name: to.Ptr("srs-fluxconfig-srs-kustomization1"),
// AppliedBy: &armfluxconfigurations.ObjectReferenceDefinition{
// Name: to.Ptr("my-name"),
// Namespace: to.Ptr("my-namespace"),
// },
// ComplianceState: to.Ptr(armfluxconfigurations.FluxComplianceStateCompliant),
// HelmReleaseProperties: &armfluxconfigurations.HelmReleasePropertiesDefinition{
// HelmChartRef: &armfluxconfigurations.ObjectReferenceDefinition{
// Name: to.Ptr("myname"),
// Namespace: to.Ptr("mynamespace"),
// },
// LastRevisionApplied: to.Ptr[int64](1),
// },
// Kind: to.Ptr("Kustomization"),
// StatusConditions: []*armfluxconfigurations.ObjectStatusConditionDefinition{
// {
// Type: to.Ptr("Ready"),
// LastTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-19T18:12:40.000Z"); return t}()),
// Message: to.Ptr("'Applied revision: master/0ba6f0d30760d567de0bac86c8c4eec13ce1a590'"),
// Reason: to.Ptr("ReconciliationSucceeded"),
// Status: to.Ptr("True"),
// }},
// },
// {
// Name: to.Ptr("srs-fluxconfig-srs-kustomization2"),
// ComplianceState: to.Ptr(armfluxconfigurations.FluxComplianceStateCompliant),
// HelmReleaseProperties: &armfluxconfigurations.HelmReleasePropertiesDefinition{
// HelmChartRef: &armfluxconfigurations.ObjectReferenceDefinition{
// Name: to.Ptr("myname"),
// Namespace: to.Ptr("mynamespace"),
// },
// LastRevisionApplied: to.Ptr[int64](1),
// },
// Kind: to.Ptr("Kustomization"),
// StatusConditions: []*armfluxconfigurations.ObjectStatusConditionDefinition{
// {
// Type: to.Ptr("Ready"),
// LastTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-19T18:12:40.000Z"); return t}()),
// Message: to.Ptr("'Applied revision: master/0ba6f0d30760d567de0bac86c8c4eec13ce1a590'"),
// Reason: to.Ptr("ReconciliationSucceeded"),
// Status: to.Ptr("True"),
// }},
// }},
// Suspend: to.Ptr(false),
// },
// SystemData: &armfluxconfigurations.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-19T05:10:57.027Z"); return t}()),
// CreatedBy: to.Ptr("string"),
// CreatedByType: to.Ptr(armfluxconfigurations.CreatedByTypeApplication),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-19T05:10:57.027Z"); return t}()),
// LastModifiedBy: to.Ptr("string"),
// LastModifiedByType: to.Ptr(armfluxconfigurations.CreatedByTypeApplication),
// },
// }
}
Output:
func (*Client) NewListPager ¶
func (client *Client) NewListPager(resourceGroupName string, clusterRp string, clusterResourceName string, clusterName string, options *ClientListOptions) *runtime.Pager[ClientListResponse]
NewListPager - List all Flux Configurations.
Generated from API version 2025-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterRp - The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.
- clusterResourceName - The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters, appliances.
- clusterName - The name of the kubernetes cluster.
- options - ClientListOptions contains the optional parameters for the Client.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba0c086df0ebe03a61579485c1c10de0d17804b2/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/fluxConfigurations/stable/2025-04-01/examples/ListFluxConfigurations.json
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kubernetesconfiguration/armfluxconfigurations"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armfluxconfigurations.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewClient().NewListPager("rg1", "Microsoft.Kubernetes", "connectedClusters", "clusterName1", nil)
for pager.More() {
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range page.Value {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page.List = armfluxconfigurations.List{
// Value: []*armfluxconfigurations.FluxConfiguration{
// {
// Name: to.Ptr("srs-fluxconfig"),
// Type: to.Ptr("Microsoft.KubernetesConfiguration/fluxConfigurations"),
// ID: to.Ptr("/subscriptions/subId1/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/clusterName1/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/srs-fluxconfig"),
// Properties: &armfluxconfigurations.FluxConfigurationProperties{
// ComplianceState: to.Ptr(armfluxconfigurations.FluxComplianceStateCompliant),
// ErrorMessage: to.Ptr(""),
// GitRepository: &armfluxconfigurations.GitRepositoryDefinition{
// RepositoryRef: &armfluxconfigurations.RepositoryRefDefinition{
// Branch: to.Ptr("master"),
// },
// SyncIntervalInSeconds: to.Ptr[int64](600),
// TimeoutInSeconds: to.Ptr[int64](600),
// URL: to.Ptr("https://github.com/Azure/arc-k8s-demo"),
// },
// Kustomizations: map[string]*armfluxconfigurations.KustomizationDefinition{
// "srs-kustomization1": &armfluxconfigurations.KustomizationDefinition{
// Name: to.Ptr("srs-kustomization1"),
// Path: to.Ptr("./test/path"),
// DependsOn: []*string{
// },
// PostBuild: &armfluxconfigurations.PostBuildDefinition{
// Substitute: map[string]*string{
// "cluster_env": to.Ptr("prod"),
// "replica_count": to.Ptr("2"),
// },
// SubstituteFrom: []*armfluxconfigurations.SubstituteFromDefinition{
// {
// Name: to.Ptr("cluster-test"),
// Kind: to.Ptr("ConfigMap"),
// Optional: to.Ptr(true),
// }},
// },
// SyncIntervalInSeconds: to.Ptr[int64](600),
// TimeoutInSeconds: to.Ptr[int64](600),
// Wait: to.Ptr(true),
// },
// "srs-kustomization2": &armfluxconfigurations.KustomizationDefinition{
// Name: to.Ptr("srs-kustomization2"),
// Path: to.Ptr("./other/test/path"),
// DependsOn: []*string{
// to.Ptr("srs-kustomization1")},
// PostBuild: &armfluxconfigurations.PostBuildDefinition{
// SubstituteFrom: []*armfluxconfigurations.SubstituteFromDefinition{
// {
// Name: to.Ptr("cluster-values"),
// Kind: to.Ptr("ConfigMap"),
// Optional: to.Ptr(true),
// },
// {
// Name: to.Ptr("secret-name"),
// Kind: to.Ptr("Secret"),
// Optional: to.Ptr(false),
// }},
// },
// Prune: to.Ptr(false),
// RetryIntervalInSeconds: to.Ptr[int64](600),
// SyncIntervalInSeconds: to.Ptr[int64](600),
// TimeoutInSeconds: to.Ptr[int64](600),
// Wait: to.Ptr(false),
// },
// },
// Namespace: to.Ptr("srs-namespace"),
// ProvisioningState: to.Ptr(armfluxconfigurations.ProvisioningStateSucceeded),
// RepositoryPublicKey: to.Ptr("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDiNkrANrhtRy+02Xc7b5bwvgOKvQMbqUQaXeB6FCDkbLaavw/zO/vIhIBEQu+vbBt6IlI/Pui0rMFr5JjA8Vwwd85oabzU07TPzbFvKSU9eCXqWRKWf0DHNQj/kxPJNtyPYFv3lGoiZZ6QzejOxlW/lPPokUePN0oI10daWwqznm2q0Cmh1EgPUYveq3J5KCWncZXCdwY36zWYulCWFaqazoaGy4kxcqlVy+mPjE/UJthaoLm3mq+23uhlmmfCc1j7W6+H6fcOwTyOtcbimxz2Ug8HlTzSTXBPtEe7qyllMyk62EPNUUq4bVoVsex9sKBK6/hW0Cn2P5i5jslUPCQF"),
// Scope: to.Ptr(armfluxconfigurations.ScopeTypeCluster),
// SourceKind: to.Ptr(armfluxconfigurations.SourceKindTypeGitRepository),
// SourceSyncedCommitID: to.Ptr("master/0ba6f0d30760d567de0bac86c8c4eec13ce1a590"),
// SourceUpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-19T18:17:12.000Z"); return t}()),
// StatusUpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-19T18:17:12.000Z"); return t}()),
// Statuses: []*armfluxconfigurations.ObjectStatusDefinition{
// {
// Name: to.Ptr("srs-fluxconfig"),
// ComplianceState: to.Ptr(armfluxconfigurations.FluxComplianceStateCompliant),
// Kind: to.Ptr("GitRepository"),
// },
// {
// Name: to.Ptr("srs-fluxconfig-srs-kustomization1"),
// ComplianceState: to.Ptr(armfluxconfigurations.FluxComplianceStateCompliant),
// Kind: to.Ptr("Kustomization"),
// },
// {
// Name: to.Ptr("srs-fluxconfig-srs-kustomization2"),
// ComplianceState: to.Ptr(armfluxconfigurations.FluxComplianceStateCompliant),
// Kind: to.Ptr("Kustomization"),
// }},
// Suspend: to.Ptr(false),
// },
// SystemData: &armfluxconfigurations.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-19T05:10:57.027Z"); return t}()),
// CreatedBy: to.Ptr("string"),
// CreatedByType: to.Ptr(armfluxconfigurations.CreatedByTypeApplication),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-19T05:10:57.027Z"); return t}()),
// LastModifiedBy: to.Ptr("string"),
// LastModifiedByType: to.Ptr(armfluxconfigurations.CreatedByTypeApplication),
// },
// },
// {
// Name: to.Ptr("srs-fluxconfig"),
// Type: to.Ptr("Microsoft.KubernetesConfiguration/fluxConfigurations"),
// ID: to.Ptr("/subscriptions/subId1/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/clusterName1/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/srs-fluxconfig"),
// Properties: &armfluxconfigurations.FluxConfigurationProperties{
// ComplianceState: to.Ptr(armfluxconfigurations.FluxComplianceStateCompliant),
// ErrorMessage: to.Ptr(""),
// GitRepository: &armfluxconfigurations.GitRepositoryDefinition{
// RepositoryRef: &armfluxconfigurations.RepositoryRefDefinition{
// Branch: to.Ptr("master"),
// },
// SyncIntervalInSeconds: to.Ptr[int64](600),
// TimeoutInSeconds: to.Ptr[int64](600),
// URL: to.Ptr("https://github.com/Azure/arc-k8s-demo"),
// },
// Kustomizations: map[string]*armfluxconfigurations.KustomizationDefinition{
// "srs-kustomization1": &armfluxconfigurations.KustomizationDefinition{
// Name: to.Ptr("srs-kustomization1"),
// Path: to.Ptr("./test/path"),
// DependsOn: []*string{
// },
// SyncIntervalInSeconds: to.Ptr[int64](600),
// TimeoutInSeconds: to.Ptr[int64](600),
// },
// "srs-kustomization2": &armfluxconfigurations.KustomizationDefinition{
// Name: to.Ptr("srs-kustomization2"),
// Path: to.Ptr("./other/test/path"),
// DependsOn: []*string{
// to.Ptr("srs-kustomization1")},
// Prune: to.Ptr(false),
// RetryIntervalInSeconds: to.Ptr[int64](600),
// SyncIntervalInSeconds: to.Ptr[int64](600),
// TimeoutInSeconds: to.Ptr[int64](600),
// },
// },
// Namespace: to.Ptr("srs-namespace"),
// ProvisioningState: to.Ptr(armfluxconfigurations.ProvisioningStateSucceeded),
// RepositoryPublicKey: to.Ptr("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDiNkrANrhtRy+02Xc7b5bwvgOKvQMbqUQaXeB6FCDkbLaavw/zO/vIhIBEQu+vbBt6IlI/Pui0rMFr5JjA8Vwwd85oabzU07TPzbFvKSU9eCXqWRKWf0DHNQj/kxPJNtyPYFv3lGoiZZ6QzejOxlW/lPPokUePN0oI10daWwqznm2q0Cmh1EgPUYveq3J5KCWncZXCdwY36zWYulCWFaqazoaGy4kxcqlVy+mPjE/UJthaoLm3mq+23uhlmmfCc1j7W6+H6fcOwTyOtcbimxz2Ug8HlTzSTXBPtEe7qyllMyk62EPNUUq4bVoVsex9sKBK6/hW0Cn2P5i5jslUPCQF"),
// Scope: to.Ptr(armfluxconfigurations.ScopeTypeCluster),
// SourceKind: to.Ptr(armfluxconfigurations.SourceKindTypeGitRepository),
// SourceSyncedCommitID: to.Ptr("master/0ba6f0d30760d567de0bac86c8c4eec13ce1a590"),
// SourceUpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-19T18:17:12.000Z"); return t}()),
// StatusUpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-19T18:17:12.000Z"); return t}()),
// Statuses: []*armfluxconfigurations.ObjectStatusDefinition{
// {
// Name: to.Ptr("srs-fluxconfig"),
// ComplianceState: to.Ptr(armfluxconfigurations.FluxComplianceStateCompliant),
// Kind: to.Ptr("GitRepository"),
// },
// {
// Name: to.Ptr("srs-fluxconfig-srs-kustomization1"),
// ComplianceState: to.Ptr(armfluxconfigurations.FluxComplianceStateCompliant),
// Kind: to.Ptr("Kustomization"),
// },
// {
// Name: to.Ptr("srs-fluxconfig-srs-kustomization2"),
// ComplianceState: to.Ptr(armfluxconfigurations.FluxComplianceStateCompliant),
// Kind: to.Ptr("Kustomization"),
// }},
// Suspend: to.Ptr(false),
// },
// SystemData: &armfluxconfigurations.SystemData{
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-19T05:10:57.027Z"); return t}()),
// CreatedBy: to.Ptr("string"),
// CreatedByType: to.Ptr(armfluxconfigurations.CreatedByTypeApplication),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-19T05:10:57.027Z"); return t}()),
// LastModifiedBy: to.Ptr("string"),
// LastModifiedByType: to.Ptr(armfluxconfigurations.CreatedByTypeApplication),
// },
// }},
// }
}
}
Output:
type ClientBeginCreateOrUpdateOptions ¶
type ClientBeginCreateOrUpdateOptions struct {
// Resumes the long-running operation from the provided token.
ResumeToken string
}
ClientBeginCreateOrUpdateOptions contains the optional parameters for the Client.BeginCreateOrUpdate method.
type ClientBeginDeleteOptions ¶
type ClientBeginDeleteOptions struct {
// Delete the extension resource in Azure - not the normal asynchronous delete.
ForceDelete *bool
// Resumes the long-running operation from the provided token.
ResumeToken string
}
ClientBeginDeleteOptions contains the optional parameters for the Client.BeginDelete method.
type ClientBeginUpdateOptions ¶
type ClientBeginUpdateOptions struct {
// Resumes the long-running operation from the provided token.
ResumeToken string
}
ClientBeginUpdateOptions contains the optional parameters for the Client.BeginUpdate method.
type ClientCreateOrUpdateResponse ¶
type ClientCreateOrUpdateResponse struct {
// The Flux Configuration object returned in Get & Put response.
FluxConfiguration
}
ClientCreateOrUpdateResponse contains the response from method Client.BeginCreateOrUpdate.
type ClientDeleteResponse ¶
type ClientDeleteResponse struct {
}
ClientDeleteResponse contains the response from method Client.BeginDelete.
type ClientFactory ¶
type ClientFactory struct {
// contains filtered or unexported fields
}
ClientFactory is a client factory used to create any client in this module. Don't use this type directly, use NewClientFactory instead.
func NewClientFactory ¶
func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error)
NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ClientFactory) NewClient ¶
func (c *ClientFactory) NewClient() *Client
NewClient creates a new instance of Client.
func (*ClientFactory) NewFluxConfigOperationStatusClient ¶
func (c *ClientFactory) NewFluxConfigOperationStatusClient() *FluxConfigOperationStatusClient
NewFluxConfigOperationStatusClient creates a new instance of FluxConfigOperationStatusClient.
type ClientGetOptions ¶
type ClientGetOptions struct {
}
ClientGetOptions contains the optional parameters for the Client.Get method.
type ClientGetResponse ¶
type ClientGetResponse struct {
// The Flux Configuration object returned in Get & Put response.
FluxConfiguration
}
ClientGetResponse contains the response from method Client.Get.
type ClientListOptions ¶
type ClientListOptions struct {
}
ClientListOptions contains the optional parameters for the Client.NewListPager method.
type ClientListResponse ¶
type ClientListResponse struct {
// Result of the request to list Flux Configurations. It contains a list of FluxConfiguration objects and a URL link to get
// the next set of results.
List
}
ClientListResponse contains the response from method Client.NewListPager.
type ClientUpdateResponse ¶
type ClientUpdateResponse struct {
// The Flux Configuration object returned in Get & Put response.
FluxConfiguration
}
ClientUpdateResponse contains the response from method Client.BeginUpdate.
type CreatedByType ¶
type CreatedByType string
CreatedByType - The type of identity that created the resource.
const ( CreatedByTypeApplication CreatedByType = "Application" CreatedByTypeKey CreatedByType = "Key" CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" CreatedByTypeUser CreatedByType = "User" )
func PossibleCreatedByTypeValues ¶
func PossibleCreatedByTypeValues() []CreatedByType
PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.
type ErrorAdditionalInfo ¶
type ErrorAdditionalInfo struct {
// READ-ONLY; The additional info.
Info any
// READ-ONLY; The additional info type.
Type *string
}
ErrorAdditionalInfo - The resource management error additional info.
func (ErrorAdditionalInfo) MarshalJSON ¶
func (e ErrorAdditionalInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorAdditionalInfo.
func (*ErrorAdditionalInfo) UnmarshalJSON ¶
func (e *ErrorAdditionalInfo) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorAdditionalInfo.
type ErrorDetail ¶
type ErrorDetail struct {
// READ-ONLY; The error additional info.
AdditionalInfo []*ErrorAdditionalInfo
// READ-ONLY; The error code.
Code *string
// READ-ONLY; The error details.
Details []*ErrorDetail
// READ-ONLY; The error message.
Message *string
// READ-ONLY; The error target.
Target *string
}
ErrorDetail - The error detail.
func (ErrorDetail) MarshalJSON ¶
func (e ErrorDetail) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorDetail.
func (*ErrorDetail) UnmarshalJSON ¶
func (e *ErrorDetail) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDetail.
type FluxComplianceState ¶
type FluxComplianceState string
FluxComplianceState - Compliance state of the cluster object.
const ( FluxComplianceStateCompliant FluxComplianceState = "Compliant" FluxComplianceStateNonCompliant FluxComplianceState = "Non-Compliant" FluxComplianceStatePending FluxComplianceState = "Pending" FluxComplianceStateSuspended FluxComplianceState = "Suspended" FluxComplianceStateUnknown FluxComplianceState = "Unknown" )
func PossibleFluxComplianceStateValues ¶
func PossibleFluxComplianceStateValues() []FluxComplianceState
PossibleFluxComplianceStateValues returns the possible values for the FluxComplianceState const type.
type FluxConfigOperationStatusClient ¶
type FluxConfigOperationStatusClient struct {
// contains filtered or unexported fields
}
FluxConfigOperationStatusClient contains the methods for the FluxConfigOperationStatus group. Don't use this type directly, use NewFluxConfigOperationStatusClient() instead.
func NewFluxConfigOperationStatusClient ¶
func NewFluxConfigOperationStatusClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FluxConfigOperationStatusClient, error)
NewFluxConfigOperationStatusClient creates a new instance of FluxConfigOperationStatusClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*FluxConfigOperationStatusClient) Get ¶
func (client *FluxConfigOperationStatusClient) Get(ctx context.Context, resourceGroupName string, clusterRp string, clusterResourceName string, clusterName string, fluxConfigurationName string, operationID string, options *FluxConfigOperationStatusClientGetOptions) (FluxConfigOperationStatusClientGetResponse, error)
Get - Get Async Operation status If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2025-04-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterRp - The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.
- clusterResourceName - The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters, appliances.
- clusterName - The name of the kubernetes cluster.
- fluxConfigurationName - Name of the Flux Configuration.
- operationID - operation Id
- options - FluxConfigOperationStatusClientGetOptions contains the optional parameters for the FluxConfigOperationStatusClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/ba0c086df0ebe03a61579485c1c10de0d17804b2/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/fluxConfigurations/stable/2025-04-01/examples/GetFluxConfigurationAsyncOperationStatus.json
package main
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/kubernetesconfiguration/armfluxconfigurations"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armfluxconfigurations.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewFluxConfigOperationStatusClient().Get(ctx, "rg1", "Microsoft.Kubernetes", "connectedClusters", "clusterName1", "srs-fluxconfig", "99999999-9999-9999-9999-999999999999", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.OperationStatusResult = armfluxconfigurations.OperationStatusResult{
// Name: to.Ptr("99999999-9999-9999-9999-999999999999"),
// ID: to.Ptr("/subscriptions/subId1/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/clusterName1/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/srs-fluxconfig/operations/99999999-9999-9999-9999-999999999999"),
// Properties: map[string]*string{
// },
// Status: to.Ptr("Succeeded"),
// }
}
Output:
type FluxConfigOperationStatusClientGetOptions ¶
type FluxConfigOperationStatusClientGetOptions struct {
}
FluxConfigOperationStatusClientGetOptions contains the optional parameters for the FluxConfigOperationStatusClient.Get method.
type FluxConfigOperationStatusClientGetResponse ¶
type FluxConfigOperationStatusClientGetResponse struct {
// The current status of an async operation.
OperationStatusResult
}
FluxConfigOperationStatusClientGetResponse contains the response from method FluxConfigOperationStatusClient.Get.
type FluxConfiguration ¶
type FluxConfiguration struct {
// Properties to create a Flux Configuration resource
Properties *FluxConfigurationProperties
// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string
// READ-ONLY; The name of the resource
Name *string
// READ-ONLY; Top level metadata https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/common-api-contracts.md#system-metadata-for-all-azure-resources
SystemData *SystemData
// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type *string
}
FluxConfiguration - The Flux Configuration object returned in Get & Put response.
func (FluxConfiguration) MarshalJSON ¶
func (f FluxConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FluxConfiguration.
func (*FluxConfiguration) UnmarshalJSON ¶
func (f *FluxConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type FluxConfiguration.
type FluxConfigurationPatch ¶
type FluxConfigurationPatch struct {
// Updatable properties of an Flux Configuration Patch Request
Properties *FluxConfigurationPatchProperties
}
FluxConfigurationPatch - The Flux Configuration Patch Request object.
func (FluxConfigurationPatch) MarshalJSON ¶
func (f FluxConfigurationPatch) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FluxConfigurationPatch.
func (*FluxConfigurationPatch) UnmarshalJSON ¶
func (f *FluxConfigurationPatch) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type FluxConfigurationPatch.
type FluxConfigurationPatchProperties ¶
type FluxConfigurationPatchProperties struct {
// Parameters to reconcile to the AzureBlob source kind type.
AzureBlob *AzureBlobPatchDefinition
// Parameters to reconcile to the Bucket source kind type.
Bucket *BucketPatchDefinition
// Key-value pairs of protected configuration settings for the configuration
ConfigurationProtectedSettings map[string]*string
// Parameters to reconcile to the GitRepository source kind type.
GitRepository *GitRepositoryPatchDefinition
// Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster.
Kustomizations map[string]*KustomizationPatchDefinition
// Parameters to reconcile to the OCIRepository source kind type.
OciRepository *OCIRepositoryPatchDefinition
// Source Kind to pull the configuration data from.
SourceKind *SourceKindType
// Whether this configuration should suspend its reconciliation of its kustomizations and sources.
Suspend *bool
}
FluxConfigurationPatchProperties - Updatable properties of an Flux Configuration Patch Request
func (FluxConfigurationPatchProperties) MarshalJSON ¶
func (f FluxConfigurationPatchProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FluxConfigurationPatchProperties.
func (*FluxConfigurationPatchProperties) UnmarshalJSON ¶
func (f *FluxConfigurationPatchProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type FluxConfigurationPatchProperties.
type FluxConfigurationProperties ¶
type FluxConfigurationProperties struct {
// Parameters to reconcile to the AzureBlob source kind type.
AzureBlob *AzureBlobDefinition
// Parameters to reconcile to the Bucket source kind type.
Bucket *BucketDefinition
// Key-value pairs of protected configuration settings for the configuration
ConfigurationProtectedSettings map[string]*string
// Parameters to reconcile to the GitRepository source kind type.
GitRepository *GitRepositoryDefinition
// Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster.
Kustomizations map[string]*KustomizationDefinition
// The namespace to which this configuration is installed to. Maximum of 253 lower case alphanumeric characters, hyphen and
// period only.
Namespace *string
// Parameters to reconcile to the OCIRepository source kind type.
OciRepository *OCIRepositoryDefinition
// Maximum duration to wait for flux configuration reconciliation. E.g PT1H, PT5M, P1D
ReconciliationWaitDuration *string
// Scope at which the operator will be installed.
Scope *ScopeType
// Source Kind to pull the configuration data from.
SourceKind *SourceKindType
// Whether this configuration should suspend its reconciliation of its kustomizations and sources.
Suspend *bool
// Whether flux configuration deployment should wait for cluster to reconcile the kustomizations.
WaitForReconciliation *bool
// READ-ONLY; Combined status of the Flux Kubernetes resources created by the fluxConfiguration or created by the managed
// objects.
ComplianceState *FluxComplianceState
// READ-ONLY; Error message returned to the user in the case of provisioning failure.
ErrorMessage *string
// READ-ONLY; Status of the creation of the fluxConfiguration.
ProvisioningState *ProvisioningState
// READ-ONLY; Public Key associated with this fluxConfiguration (either generated within the cluster or provided by the user).
RepositoryPublicKey *string
// READ-ONLY; Branch and/or SHA of the source commit synced with the cluster.
SourceSyncedCommitID *string
// READ-ONLY; Datetime the fluxConfiguration synced its source on the cluster.
SourceUpdatedAt *time.Time
// READ-ONLY; Datetime the fluxConfiguration synced its status on the cluster with Azure.
StatusUpdatedAt *time.Time
// READ-ONLY; Statuses of the Flux Kubernetes resources created by the fluxConfiguration or created by the managed objects
// provisioned by the fluxConfiguration.
Statuses []*ObjectStatusDefinition
}
FluxConfigurationProperties - Properties to create a Flux Configuration resource
func (FluxConfigurationProperties) MarshalJSON ¶
func (f FluxConfigurationProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FluxConfigurationProperties.
func (*FluxConfigurationProperties) UnmarshalJSON ¶
func (f *FluxConfigurationProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type FluxConfigurationProperties.
type GitRepositoryDefinition ¶
type GitRepositoryDefinition struct {
// Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS
HTTPSCACert *string
// Plaintext HTTPS username used to access private git repositories over HTTPS
HTTPSUser *string
// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided
// configuration secrets.
LocalAuthRef *string
// Name of the provider used for authentication.
Provider *ProviderType
// The source reference for the GitRepository object.
RepositoryRef *RepositoryRefDefinition
// Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH
SSHKnownHosts *string
// The interval at which to re-reconcile the cluster git repository source with the remote.
SyncIntervalInSeconds *int64
// The maximum time to attempt to reconcile the cluster git repository source with the remote.
TimeoutInSeconds *int64
// The URL to sync for the flux configuration git repository.
URL *string
}
GitRepositoryDefinition - Parameters to reconcile to the GitRepository source kind type.
func (GitRepositoryDefinition) MarshalJSON ¶
func (g GitRepositoryDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GitRepositoryDefinition.
func (*GitRepositoryDefinition) UnmarshalJSON ¶
func (g *GitRepositoryDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GitRepositoryDefinition.
type GitRepositoryPatchDefinition ¶
type GitRepositoryPatchDefinition struct {
// Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS
HTTPSCACert *string
// Plaintext HTTPS username used to access private git repositories over HTTPS
HTTPSUser *string
// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided
// configuration secrets.
LocalAuthRef *string
// Name of the provider used for authentication.
Provider *ProviderType
// The source reference for the GitRepository object.
RepositoryRef *RepositoryRefDefinition
// Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH
SSHKnownHosts *string
// The interval at which to re-reconcile the cluster git repository source with the remote.
SyncIntervalInSeconds *int64
// The maximum time to attempt to reconcile the cluster git repository source with the remote.
TimeoutInSeconds *int64
// The URL to sync for the flux configuration git repository.
URL *string
}
GitRepositoryPatchDefinition - Parameters to reconcile to the GitRepository source kind type.
func (GitRepositoryPatchDefinition) MarshalJSON ¶
func (g GitRepositoryPatchDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GitRepositoryPatchDefinition.
func (*GitRepositoryPatchDefinition) UnmarshalJSON ¶
func (g *GitRepositoryPatchDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GitRepositoryPatchDefinition.
type HelmReleasePropertiesDefinition ¶
type HelmReleasePropertiesDefinition struct {
// Total number of times that the HelmRelease failed to install or upgrade
FailureCount *int64
// The reference to the HelmChart object used as the source to this HelmRelease
HelmChartRef *ObjectReferenceDefinition
// Number of times that the HelmRelease failed to install
InstallFailureCount *int64
// The revision number of the last released object change
LastRevisionApplied *int64
// Number of times that the HelmRelease failed to upgrade
UpgradeFailureCount *int64
}
HelmReleasePropertiesDefinition - Properties for HelmRelease objects
func (HelmReleasePropertiesDefinition) MarshalJSON ¶
func (h HelmReleasePropertiesDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type HelmReleasePropertiesDefinition.
func (*HelmReleasePropertiesDefinition) UnmarshalJSON ¶
func (h *HelmReleasePropertiesDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type HelmReleasePropertiesDefinition.
type KustomizationDefinition ¶
type KustomizationDefinition struct {
// Specifies other Kustomizations that this Kustomization depends on. This Kustomization will not reconcile until all dependencies
// have completed their reconciliation.
DependsOn []*string
// Enable/disable re-creating Kubernetes resources on the cluster when patching fails due to an immutable field change.
Force *bool
// The path in the source reference to reconcile on the cluster.
Path *string
// Used for variable substitution for this Kustomization after kustomize build.
PostBuild *PostBuildDefinition
// Enable/disable garbage collections of Kubernetes objects created by this Kustomization.
Prune *bool
// The interval at which to re-reconcile the Kustomization on the cluster in the event of failure on reconciliation.
RetryIntervalInSeconds *int64
// The interval at which to re-reconcile the Kustomization on the cluster.
SyncIntervalInSeconds *int64
// The maximum time to attempt to reconcile the Kustomization on the cluster.
TimeoutInSeconds *int64
// Enable/disable health check for all Kubernetes objects created by this Kustomization.
Wait *bool
// READ-ONLY; Name of the Kustomization, matching the key in the Kustomizations object map.
Name *string
}
KustomizationDefinition - The Kustomization defining how to reconcile the artifact pulled by the source type on the cluster.
func (KustomizationDefinition) MarshalJSON ¶
func (k KustomizationDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type KustomizationDefinition.
func (*KustomizationDefinition) UnmarshalJSON ¶
func (k *KustomizationDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type KustomizationDefinition.
type KustomizationPatchDefinition ¶
type KustomizationPatchDefinition struct {
// Specifies other Kustomizations that this Kustomization depends on. This Kustomization will not reconcile until all dependencies
// have completed their reconciliation.
DependsOn []*string
// Enable/disable re-creating Kubernetes resources on the cluster when patching fails due to an immutable field change.
Force *bool
// The path in the source reference to reconcile on the cluster.
Path *string
// Used for variable substitution for this Kustomization after kustomize build.
PostBuild *PostBuildPatchDefinition
// Enable/disable garbage collections of Kubernetes objects created by this Kustomization.
Prune *bool
// The interval at which to re-reconcile the Kustomization on the cluster in the event of failure on reconciliation.
RetryIntervalInSeconds *int64
// The interval at which to re-reconcile the Kustomization on the cluster.
SyncIntervalInSeconds *int64
// The maximum time to attempt to reconcile the Kustomization on the cluster.
TimeoutInSeconds *int64
// Enable/disable health check for all Kubernetes objects created by this Kustomization.
Wait *bool
}
KustomizationPatchDefinition - The Kustomization defining how to reconcile the artifact pulled by the source type on the cluster.
func (KustomizationPatchDefinition) MarshalJSON ¶
func (k KustomizationPatchDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type KustomizationPatchDefinition.
func (*KustomizationPatchDefinition) UnmarshalJSON ¶
func (k *KustomizationPatchDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type KustomizationPatchDefinition.
type LayerSelectorDefinition ¶
type LayerSelectorDefinition struct {
// The first layer matching the specified media type will be used.
MediaType *string
// The operation to be performed on the selected layer. The default value is 'extract', but it can be set to 'copy'.
Operation *OperationType
}
LayerSelectorDefinition - Parameters to specify which layer to pull from the OCI artifact. By default, the first layer in the artifact is pulled.
func (LayerSelectorDefinition) MarshalJSON ¶
func (l LayerSelectorDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LayerSelectorDefinition.
func (*LayerSelectorDefinition) UnmarshalJSON ¶
func (l *LayerSelectorDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LayerSelectorDefinition.
type LayerSelectorPatchDefinition ¶
type LayerSelectorPatchDefinition struct {
// The first layer matching the specified media type will be used.
MediaType *string
// The operation to be performed on the selected layer. The default value is 'extract', but it can be set to 'copy'.
Operation *OperationType
}
LayerSelectorPatchDefinition - Parameters to specify which layer to pull from the OCI artifact. By default, the first layer in the artifact is pulled.
func (LayerSelectorPatchDefinition) MarshalJSON ¶
func (l LayerSelectorPatchDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LayerSelectorPatchDefinition.
func (*LayerSelectorPatchDefinition) UnmarshalJSON ¶
func (l *LayerSelectorPatchDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LayerSelectorPatchDefinition.
type List ¶
type List struct {
// READ-ONLY; URL to get the next set of configuration objects, if any.
NextLink *string
// READ-ONLY; List of Flux Configurations within a Kubernetes cluster.
Value []*FluxConfiguration
}
List - Result of the request to list Flux Configurations. It contains a list of FluxConfiguration objects and a URL link to get the next set of results.
func (List) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type List.
func (*List) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type List.
type ManagedIdentityDefinition ¶
type ManagedIdentityDefinition struct {
// The client Id for authenticating a Managed Identity.
ClientID *string
}
ManagedIdentityDefinition - Parameters to authenticate using a Managed Identity.
func (ManagedIdentityDefinition) MarshalJSON ¶
func (m ManagedIdentityDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedIdentityDefinition.
func (*ManagedIdentityDefinition) UnmarshalJSON ¶
func (m *ManagedIdentityDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedIdentityDefinition.
type ManagedIdentityPatchDefinition ¶
type ManagedIdentityPatchDefinition struct {
// The client Id for authenticating a Managed Identity.
ClientID *string
}
ManagedIdentityPatchDefinition - Parameters to authenticate using a Managed Identity.
func (ManagedIdentityPatchDefinition) MarshalJSON ¶
func (m ManagedIdentityPatchDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedIdentityPatchDefinition.
func (*ManagedIdentityPatchDefinition) UnmarshalJSON ¶
func (m *ManagedIdentityPatchDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedIdentityPatchDefinition.
type MatchOidcIdentityDefinition ¶
type MatchOidcIdentityDefinition struct {
// The regex pattern to match against to verify the OIDC issuer.
Issuer *string
// The regex pattern to match against to verify the identity subject.
Subject *string
}
MatchOidcIdentityDefinition - MatchOIDCIdentity defines the criteria for matching the identity while verifying an OCI artifact.
func (MatchOidcIdentityDefinition) MarshalJSON ¶
func (m MatchOidcIdentityDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MatchOidcIdentityDefinition.
func (*MatchOidcIdentityDefinition) UnmarshalJSON ¶
func (m *MatchOidcIdentityDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MatchOidcIdentityDefinition.
type MatchOidcIdentityPatchDefinition ¶
type MatchOidcIdentityPatchDefinition struct {
// The regex pattern to match against to verify the OIDC issuer.
Issuer *string
// The regex pattern to match against to verify the identity subject.
Subject *string
}
MatchOidcIdentityPatchDefinition - MatchOIDCIdentity defines the criteria for matching the identity while verifying an OCI artifact.
func (MatchOidcIdentityPatchDefinition) MarshalJSON ¶
func (m MatchOidcIdentityPatchDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MatchOidcIdentityPatchDefinition.
func (*MatchOidcIdentityPatchDefinition) UnmarshalJSON ¶
func (m *MatchOidcIdentityPatchDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MatchOidcIdentityPatchDefinition.
type OCIRepositoryDefinition ¶
type OCIRepositoryDefinition struct {
// Specify whether to allow connecting to a non-TLS HTTP container registry.
Insecure *bool
// The layer to be pulled from the OCI artifact.
LayerSelector *LayerSelectorDefinition
// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided
// configuration secrets.
LocalAuthRef *string
// The source reference for the OCIRepository object.
RepositoryRef *OCIRepositoryRefDefinition
// The service account name to authenticate with the OCI repository.
ServiceAccountName *string
// The interval at which to re-reconcile the cluster OCI repository source with the remote.
SyncIntervalInSeconds *int64
// Parameters to authenticate using TLS config for OCI repository.
TLSConfig *TLSConfigDefinition
// The maximum time to attempt to reconcile the cluster OCI repository source with the remote.
TimeoutInSeconds *int64
// The URL to sync for the flux configuration OCI repository.
URL *string
// Specifies whether to use Workload Identity to authenticate with the OCI repository.
UseWorkloadIdentity *bool
// Verification of the authenticity of an OCI Artifact.
Verify *VerifyDefinition
}
OCIRepositoryDefinition - Parameters to reconcile to the OCIRepository source kind type.
func (OCIRepositoryDefinition) MarshalJSON ¶
func (o OCIRepositoryDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OCIRepositoryDefinition.
func (*OCIRepositoryDefinition) UnmarshalJSON ¶
func (o *OCIRepositoryDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OCIRepositoryDefinition.
type OCIRepositoryPatchDefinition ¶
type OCIRepositoryPatchDefinition struct {
// Specify whether to allow connecting to a non-TLS HTTP container registry.
Insecure *bool
// The layer to be pulled from the OCI artifact.
LayerSelector *LayerSelectorPatchDefinition
// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided
// configuration secrets.
LocalAuthRef *string
// The source reference for the OCIRepository object.
RepositoryRef *OCIRepositoryRefPatchDefinition
// The service account name to authenticate with the OCI repository.
ServiceAccountName *string
// The interval at which to re-reconcile the cluster OCI repository source with the remote.
SyncIntervalInSeconds *int64
// Parameters to authenticate using TLS config for OCI repository.
TLSConfig *TLSConfigPatchDefinition
// The maximum time to attempt to reconcile the cluster OCI repository source with the remote.
TimeoutInSeconds *int64
// The URL to sync for the flux configuration OCI repository.
URL *string
// Specifies whether to use Workload Identity to authenticate with the OCI repository.
UseWorkloadIdentity *bool
// Verification of the authenticity of an OCI Artifact.
Verify *VerifyPatchDefinition
}
OCIRepositoryPatchDefinition - Parameters to reconcile to the OCIRepository source kind type.
func (OCIRepositoryPatchDefinition) MarshalJSON ¶
func (o OCIRepositoryPatchDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OCIRepositoryPatchDefinition.
func (*OCIRepositoryPatchDefinition) UnmarshalJSON ¶
func (o *OCIRepositoryPatchDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OCIRepositoryPatchDefinition.
type OCIRepositoryRefDefinition ¶
type OCIRepositoryRefDefinition struct {
// The image digest to pull from OCI repository, the value should be in the format ‘sha256:’. This takes precedence over semver.
Digest *string
// The semver range used to match against OCI repository tags. This takes precedence over tag.
Semver *string
// The OCI repository image tag name to pull. This defaults to 'latest'.
Tag *string
}
OCIRepositoryRefDefinition - The source reference for the OCIRepository object.
func (OCIRepositoryRefDefinition) MarshalJSON ¶
func (o OCIRepositoryRefDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OCIRepositoryRefDefinition.
func (*OCIRepositoryRefDefinition) UnmarshalJSON ¶
func (o *OCIRepositoryRefDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OCIRepositoryRefDefinition.
type OCIRepositoryRefPatchDefinition ¶
type OCIRepositoryRefPatchDefinition struct {
// The image digest to pull from OCI repository, the value should be in the format ‘sha256:’. This takes precedence over semver.
Digest *string
// The semver range used to match against OCI repository tags. This takes precedence over tag.
Semver *string
// The OCI repository image tag name to pull. This defaults to 'latest'.
Tag *string
}
OCIRepositoryRefPatchDefinition - The source reference for the OCIRepository object.
func (OCIRepositoryRefPatchDefinition) MarshalJSON ¶
func (o OCIRepositoryRefPatchDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OCIRepositoryRefPatchDefinition.
func (*OCIRepositoryRefPatchDefinition) UnmarshalJSON ¶
func (o *OCIRepositoryRefPatchDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OCIRepositoryRefPatchDefinition.
type ObjectReferenceDefinition ¶
type ObjectReferenceDefinition struct {
// Name of the object
Name *string
// Namespace of the object
Namespace *string
}
ObjectReferenceDefinition - Object reference to a Kubernetes object on a cluster
func (ObjectReferenceDefinition) MarshalJSON ¶
func (o ObjectReferenceDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ObjectReferenceDefinition.
func (*ObjectReferenceDefinition) UnmarshalJSON ¶
func (o *ObjectReferenceDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ObjectReferenceDefinition.
type ObjectStatusConditionDefinition ¶
type ObjectStatusConditionDefinition struct {
// Last time this status condition has changed
LastTransitionTime *time.Time
// A more verbose description of the object status condition
Message *string
// Reason for the specified status condition type status
Reason *string
// Status of the Kubernetes object condition type
Status *string
// Object status condition type for this object
Type *string
}
ObjectStatusConditionDefinition - Status condition of Kubernetes object
func (ObjectStatusConditionDefinition) MarshalJSON ¶
func (o ObjectStatusConditionDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ObjectStatusConditionDefinition.
func (*ObjectStatusConditionDefinition) UnmarshalJSON ¶
func (o *ObjectStatusConditionDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ObjectStatusConditionDefinition.
type ObjectStatusDefinition ¶
type ObjectStatusDefinition struct {
// Object reference to the Kustomization that applied this object
AppliedBy *ObjectReferenceDefinition
// Compliance state of the applied object showing whether the applied object has come into a ready state on the cluster.
ComplianceState *FluxComplianceState
// Additional properties that are provided from objects of the HelmRelease kind
HelmReleaseProperties *HelmReleasePropertiesDefinition
// Kind of the applied object
Kind *string
// Name of the applied object
Name *string
// Namespace of the applied object
Namespace *string
// List of Kubernetes object status conditions present on the cluster
StatusConditions []*ObjectStatusConditionDefinition
}
ObjectStatusDefinition - Statuses of objects deployed by the user-specified kustomizations from the git repository.
func (ObjectStatusDefinition) MarshalJSON ¶
func (o ObjectStatusDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ObjectStatusDefinition.
func (*ObjectStatusDefinition) UnmarshalJSON ¶
func (o *ObjectStatusDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ObjectStatusDefinition.
type OperationStatusResult ¶
type OperationStatusResult struct {
// REQUIRED; Operation status.
Status *string
// Fully qualified ID for the async operation.
ID *string
// Name of the async operation.
Name *string
// Additional information, if available.
Properties map[string]*string
// READ-ONLY; If present, details of the operation error.
Error *ErrorDetail
}
OperationStatusResult - The current status of an async operation.
func (OperationStatusResult) MarshalJSON ¶
func (o OperationStatusResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationStatusResult.
func (*OperationStatusResult) UnmarshalJSON ¶
func (o *OperationStatusResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationStatusResult.
type OperationType ¶
type OperationType string
OperationType - The operation to be performed on the selected layer. The default value is 'extract', but it can be set to 'copy'.
const ( OperationTypeCopy OperationType = "copy" OperationTypeExtract OperationType = "extract" )
func PossibleOperationTypeValues ¶
func PossibleOperationTypeValues() []OperationType
PossibleOperationTypeValues returns the possible values for the OperationType const type.
type PostBuildDefinition ¶
type PostBuildDefinition struct {
// Key/value pairs holding the variables to be substituted in this Kustomization.
Substitute map[string]*string
// Array of ConfigMaps/Secrets from which the variables are substituted for this Kustomization.
SubstituteFrom []*SubstituteFromDefinition
}
PostBuildDefinition - The postBuild definitions defining variable substitutions for this Kustomization after kustomize build.
func (PostBuildDefinition) MarshalJSON ¶
func (p PostBuildDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PostBuildDefinition.
func (*PostBuildDefinition) UnmarshalJSON ¶
func (p *PostBuildDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PostBuildDefinition.
type PostBuildPatchDefinition ¶
type PostBuildPatchDefinition struct {
// Key/value pairs holding the variables to be substituted in this Kustomization.
Substitute map[string]*string
// Array of ConfigMaps/Secrets from which the variables are substituted for this Kustomization.
SubstituteFrom []*SubstituteFromPatchDefinition
}
PostBuildPatchDefinition - The postBuild definitions defining variable substitutions for this Kustomization after kustomize build.
func (PostBuildPatchDefinition) MarshalJSON ¶
func (p PostBuildPatchDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PostBuildPatchDefinition.
func (*PostBuildPatchDefinition) UnmarshalJSON ¶
func (p *PostBuildPatchDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PostBuildPatchDefinition.
type ProviderType ¶
type ProviderType string
ProviderType - Name of the provider used for authentication.
const ( // ProviderTypeAzure - Azure provider can be used to authenticate to Azure DevOps repositories using Managed Identity. ProviderTypeAzure ProviderType = "Azure" // ProviderTypeGeneric - Generic is the default provider that indicates secret-based authentication mechanism. ProviderTypeGeneric ProviderType = "Generic" // ProviderTypeGitHub - GitHub provider can be used to authenticate ProviderTypeGitHub ProviderType = "GitHub" )
func PossibleProviderTypeValues ¶
func PossibleProviderTypeValues() []ProviderType
PossibleProviderTypeValues returns the possible values for the ProviderType const type.
type ProvisioningState ¶
type ProvisioningState string
ProvisioningState - The provisioning state of the resource.
const ( ProvisioningStateCanceled ProvisioningState = "Canceled" ProvisioningStateCreating ProvisioningState = "Creating" ProvisioningStateDeleting ProvisioningState = "Deleting" ProvisioningStateFailed ProvisioningState = "Failed" ProvisioningStateSucceeded ProvisioningState = "Succeeded" ProvisioningStateUpdating ProvisioningState = "Updating" )
func PossibleProvisioningStateValues ¶
func PossibleProvisioningStateValues() []ProvisioningState
PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.
type RepositoryRefDefinition ¶
type RepositoryRefDefinition struct {
// The git repository branch name to checkout.
Branch *string
// The commit SHA to checkout. This value must be combined with the branch name to be valid. This takes precedence over semver.
Commit *string
// The semver range used to match against git repository tags. This takes precedence over tag.
Semver *string
// The git repository tag name to checkout. This takes precedence over branch.
Tag *string
}
RepositoryRefDefinition - The source reference for the GitRepository object.
func (RepositoryRefDefinition) MarshalJSON ¶
func (r RepositoryRefDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RepositoryRefDefinition.
func (*RepositoryRefDefinition) UnmarshalJSON ¶
func (r *RepositoryRefDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RepositoryRefDefinition.
type ScopeType ¶
type ScopeType string
ScopeType - Scope at which the configuration will be installed.
func PossibleScopeTypeValues ¶
func PossibleScopeTypeValues() []ScopeType
PossibleScopeTypeValues returns the possible values for the ScopeType const type.
type ServicePrincipalDefinition ¶
type ServicePrincipalDefinition struct {
// Base64-encoded certificate used to authenticate a Service Principal
ClientCertificate *string
// The password for the certificate used to authenticate a Service Principal
ClientCertificatePassword *string
// Specifies whether to include x5c header in client claims when acquiring a token to enable subject name / issuer based authentication
// for the Client Certificate
ClientCertificateSendChain *bool
// The client Id for authenticating a Service Principal.
ClientID *string
// The client secret for authenticating a Service Principal
ClientSecret *string
// The tenant Id for authenticating a Service Principal
TenantID *string
}
ServicePrincipalDefinition - Parameters to authenticate using Service Principal.
func (ServicePrincipalDefinition) MarshalJSON ¶
func (s ServicePrincipalDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServicePrincipalDefinition.
func (*ServicePrincipalDefinition) UnmarshalJSON ¶
func (s *ServicePrincipalDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServicePrincipalDefinition.
type ServicePrincipalPatchDefinition ¶
type ServicePrincipalPatchDefinition struct {
// Base64-encoded certificate used to authenticate a Service Principal
ClientCertificate *string
// The password for the certificate used to authenticate a Service Principal
ClientCertificatePassword *string
// Specifies whether to include x5c header in client claims when acquiring a token to enable subject name / issuer based authentication
// for the Client Certificate
ClientCertificateSendChain *bool
// The client Id for authenticating a Service Principal.
ClientID *string
// The client secret for authenticating a Service Principal
ClientSecret *string
// The tenant Id for authenticating a Service Principal
TenantID *string
}
ServicePrincipalPatchDefinition - Parameters to authenticate using Service Principal.
func (ServicePrincipalPatchDefinition) MarshalJSON ¶
func (s ServicePrincipalPatchDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServicePrincipalPatchDefinition.
func (*ServicePrincipalPatchDefinition) UnmarshalJSON ¶
func (s *ServicePrincipalPatchDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServicePrincipalPatchDefinition.
type SourceKindType ¶
type SourceKindType string
SourceKindType - Source Kind to pull the configuration data from.
const ( SourceKindTypeAzureBlob SourceKindType = "AzureBlob" SourceKindTypeBucket SourceKindType = "Bucket" SourceKindTypeGitRepository SourceKindType = "GitRepository" SourceKindTypeOCIRepository SourceKindType = "OCIRepository" )
func PossibleSourceKindTypeValues ¶
func PossibleSourceKindTypeValues() []SourceKindType
PossibleSourceKindTypeValues returns the possible values for the SourceKindType const type.
type SubstituteFromDefinition ¶
type SubstituteFromDefinition struct {
// Define whether it is ConfigMap or Secret that holds the variables to be used in substitution.
Kind *string
// Name of the ConfigMap/Secret that holds the variables to be used in substitution.
Name *string
// Set to True to proceed without ConfigMap/Secret, if it is not present.
Optional *bool
}
SubstituteFromDefinition - Array of ConfigMaps/Secrets from which the variables are substituted for this Kustomization.
func (SubstituteFromDefinition) MarshalJSON ¶
func (s SubstituteFromDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SubstituteFromDefinition.
func (*SubstituteFromDefinition) UnmarshalJSON ¶
func (s *SubstituteFromDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SubstituteFromDefinition.
type SubstituteFromPatchDefinition ¶
type SubstituteFromPatchDefinition struct {
// Define whether it is ConfigMap or Secret that holds the variables to be used in substitution.
Kind *string
// Name of the ConfigMap/Secret that holds the variables to be used in substitution.
Name *string
// Set to True to proceed without ConfigMap/Secret, if it is not present.
Optional *bool
}
SubstituteFromPatchDefinition - Array of ConfigMaps/Secrets from which the variables are substituted for this Kustomization.
func (SubstituteFromPatchDefinition) MarshalJSON ¶
func (s SubstituteFromPatchDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SubstituteFromPatchDefinition.
func (*SubstituteFromPatchDefinition) UnmarshalJSON ¶
func (s *SubstituteFromPatchDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SubstituteFromPatchDefinition.
type SystemData ¶
type SystemData struct {
// The timestamp of resource creation (UTC).
CreatedAt *time.Time
// The identity that created the resource.
CreatedBy *string
// The type of identity that created the resource.
CreatedByType *CreatedByType
// The timestamp of resource last modification (UTC)
LastModifiedAt *time.Time
// The identity that last modified the resource.
LastModifiedBy *string
// The type of identity that last modified the resource.
LastModifiedByType *CreatedByType
}
SystemData - Metadata pertaining to creation and last modification of the resource.
func (SystemData) MarshalJSON ¶
func (s SystemData) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SystemData.
func (*SystemData) UnmarshalJSON ¶
func (s *SystemData) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.
type TLSConfigDefinition ¶
type TLSConfigDefinition struct {
// Base64-encoded CA certificate used to verify the server.
CaCertificate *string
// Base64-encoded certificate used to authenticate a client with the OCI repository.
ClientCertificate *string
// Base64-encoded private key used to authenticate a client with the OCI repository.
PrivateKey *string
}
TLSConfigDefinition - Parameters to authenticate using TLS config for OCI repository.
func (TLSConfigDefinition) MarshalJSON ¶
func (t TLSConfigDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TLSConfigDefinition.
func (*TLSConfigDefinition) UnmarshalJSON ¶
func (t *TLSConfigDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TLSConfigDefinition.
type TLSConfigPatchDefinition ¶
type TLSConfigPatchDefinition struct {
// Base64-encoded CA certificate used to verify the server.
CaCertificate *string
// Base64-encoded certificate used to authenticate a client with the OCI repository.
ClientCertificate *string
// Base64-encoded private key used to authenticate a client with the OCI repository.
PrivateKey *string
}
TLSConfigPatchDefinition - Parameters to authenticate using TLS config for OCI repository.
func (TLSConfigPatchDefinition) MarshalJSON ¶
func (t TLSConfigPatchDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TLSConfigPatchDefinition.
func (*TLSConfigPatchDefinition) UnmarshalJSON ¶
func (t *TLSConfigPatchDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TLSConfigPatchDefinition.
type VerifyDefinition ¶
type VerifyDefinition struct {
// Array defining the criteria for matching the identity while verifying an OCI artifact.
MatchOidcIdentity []*MatchOidcIdentityDefinition
// Verification provider name.
Provider *string
// An object containing trusted public keys of trusted authors.
VerificationConfig map[string]*string
}
VerifyDefinition - Parameters to verify the authenticity of an OCI Artifact.
func (VerifyDefinition) MarshalJSON ¶
func (v VerifyDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VerifyDefinition.
func (*VerifyDefinition) UnmarshalJSON ¶
func (v *VerifyDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VerifyDefinition.
type VerifyPatchDefinition ¶
type VerifyPatchDefinition struct {
// Array defining the criteria for matching the OIDC identity while verifying an OCI artifact.
MatchOidcIdentity []*MatchOidcIdentityPatchDefinition
// Verification provider name.
Provider *string
// An object containing trusted public keys of trusted authors.
VerificationConfig map[string]*string
}
VerifyPatchDefinition - Parameters to verify the authenticity of an OCI Artifact.
func (VerifyPatchDefinition) MarshalJSON ¶
func (v VerifyPatchDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VerifyPatchDefinition.
func (*VerifyPatchDefinition) UnmarshalJSON ¶
func (v *VerifyPatchDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VerifyPatchDefinition.