diff --git a/internal/operators/manager.go b/internal/operators/manager.go index 10e8e897865..741212c8cc6 100644 --- a/internal/operators/manager.go +++ b/internal/operators/manager.go @@ -15,6 +15,8 @@ import ( manifestsapi "github.com/openshift/assisted-service/internal/manifests/api" "github.com/openshift/assisted-service/internal/operators/api" "github.com/openshift/assisted-service/internal/operators/lvm" + "github.com/openshift/assisted-service/internal/operators/mce" + "github.com/openshift/assisted-service/internal/operators/odf" "github.com/openshift/assisted-service/models" logutil "github.com/openshift/assisted-service/pkg/log" "github.com/openshift/assisted-service/pkg/s3wrapper" @@ -120,6 +122,17 @@ func (mgr *Manager) GetRequirementsBreakdownForHostInCluster(ctx context.Context return requirements, nil } +func compareOperatorName(operatorName string) func(operator *models.MonitoredOperator) bool { + return func(operator *models.MonitoredOperator) bool { + return operatorName == operator.Name + } +} +func hasMCEWithStorage(operators []*models.MonitoredOperator) bool { + return funk.Contains(operators, compareOperatorName(mce.Operator.Name)) && + (funk.Contains(operators, compareOperatorName(lvm.Operator.Name)) || + funk.Contains(operators, compareOperatorName(odf.Operator.Name))) +} + // GenerateManifests generates manifests for all enabled operators. // Returns map assigning manifest content to its desired file name func (mgr *Manager) GenerateManifests(ctx context.Context, cluster *common.Cluster) error { @@ -147,7 +160,26 @@ func (mgr *Manager) GenerateManifests(ctx context.Context, cluster *common.Clust customManifests = append(customManifests, Manifest{Name: clusterOperator.Name, Content: base64.StdEncoding.EncodeToString(manifest)}) } } - + ops := []string{} + for _, o := range cluster.MonitoredOperators { + ops = append(ops, o.Name) + } + if hasMCEWithStorage(cluster.MonitoredOperators) && false { + mgr.log.WithFields(logrus.Fields{ + "operators": ops, + }).Info("Generating AgentServiceConfig...") + agentServiceConfigYaml, err := mce.GetAgentServiceConfigWithPVCManifest() + if err != nil { + return err + } + if err = mgr.createManifests(ctx, cluster, "99-agentserviceconfig.yaml", agentServiceConfigYaml, models.ManifestFolderOpenshift); err != nil { + return err + } + } else { + mgr.log.WithFields(logrus.Fields{ + "operators": ops, + }).Info("NOT Generating AgentServiceConfig...") + } if len(customManifests) > 0 { content, err := json.Marshal(customManifests) if err != nil { diff --git a/internal/operators/mce/manifest.go b/internal/operators/mce/manifest.go index 9ba40a11239..7392945b6b3 100644 --- a/internal/operators/mce/manifest.go +++ b/internal/operators/mce/manifest.go @@ -5,6 +5,12 @@ import ( "text/template" ) +const ( + filesystemStorageSize = "10Gi" + databaseStorageSize = "10Gi" + imageStorageSize = "40Gi" +) + // Manifests returns manifests needed to deploy MCE. func Manifests() (openshiftManifests map[string][]byte, customManifests []byte, err error) { // Generate the OpenShift manifests: @@ -20,10 +26,16 @@ func Manifests() (openshiftManifests map[string][]byte, customManifests []byte, if err != nil { return } + agentServiceConfig, err := GetAgentServiceConfigWithPVCManifest() + if err != nil { + return + } + openshiftManifests = map[string][]byte{ "50_openshift-mce_ns.yaml": namespaceManifest, "50_openshift-mce_operator_group.yaml": operatorGroupManifest, "50_openshift-mce_operator_subscription.yaml": operatorSubscriptionManifest, + "zzzzzz_98_agentserviceconfig.yaml": agentServiceConfig, } mceManifest, err := getMultiClusterEngine() @@ -34,6 +46,16 @@ func Manifests() (openshiftManifests map[string][]byte, customManifests []byte, return openshiftManifests, mceManifest, nil } +func GetAgentServiceConfigWithPVCManifest() ([]byte, error) { + vars := map[string]string{ + "DATABASE_STORAGE_SIZE": databaseStorageSize, + "FILESYSTEM_STORAGE_SIZE": filesystemStorageSize, + "IMAGE_STORAGE_SIZE": imageStorageSize, + } + + return executeTemplate(vars, agentServiceConfigTemplate) +} + func getSubscription() ([]byte, error) { data := map[string]string{ "OPERATOR_NAMESPACE": Operator.Namespace, @@ -116,3 +138,724 @@ metadata: spec: targetNamespace: "{{.OPERATOR_NAMESPACE}}" ` + +const agentServiceConfigTemplate = ` + +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.6.2 + creationTimestamp: null + name: agentserviceconfigs.agent-install.openshift.io +spec: + group: agent-install.openshift.io + names: + kind: AgentServiceConfig + listKind: AgentServiceConfigList + plural: agentserviceconfigs + singular: agentserviceconfig + scope: Cluster + versions: + - name: v1beta1 + schema: + openAPIV3Schema: + description: AgentServiceConfig represents an Assisted Service deployment. + Only an AgentServiceConfig with name="agent" will be reconciled. All other + names will be rejected. + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: AgentServiceConfigSpec defines the desired state of AgentServiceConfig. + properties: + OSImageAdditionalParamsRef: + description: OSImageAdditionalParamsRef is a reference to a secret + containing a headers and query parameters to be used during OS image + fetch. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + OSImageCACertRef: + description: OSImageCACertRef is a reference to a config map containing + a certificate authority certificate this is an optional certificate + to allow a user to add a certificate authority for a HTTPS source + of images this certificate will be used by the assisted-image-service + when pulling OS images. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + databaseStorage: + description: DatabaseStorage defines the spec of the PersistentVolumeClaim + to be created for the database's filesystem. With respect to the + resource requests, minimum 10GiB is recommended. + properties: + accessModes: + description: 'accessModes contains the desired access modes the + volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' + items: + type: string + type: array + dataSource: + description: 'dataSource field can be used to specify either: + * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) + * An existing PVC (PersistentVolumeClaim) If the provisioner + or an external controller can support the specified data source, + it will create a new volume based on the contents of the specified + data source. If the AnyVolumeDataSource feature gate is enabled, + this field will always have the same contents as the DataSourceRef + field.' + properties: + apiGroup: + description: APIGroup is the group for the resource being + referenced. If APIGroup is not specified, the specified + Kind must be in the core API group. For any other third-party + types, APIGroup is required. + type: string + kind: + description: Kind is the type of resource being referenced + type: string + name: + description: Name is the name of resource being referenced + type: string + required: + - kind + - name + type: object + dataSourceRef: + description: 'dataSourceRef specifies the object from which to + populate the volume with data, if a non-empty volume is desired. + This may be any local object from a non-empty API group (non + core object) or a PersistentVolumeClaim object. When this field + is specified, volume binding will only succeed if the type of + the specified object matches some installed volume populator + or dynamic provisioner. This field will replace the functionality + of the DataSource field and as such if both fields are non-empty, + they must have the same value. For backwards compatibility, + both fields (DataSource and DataSourceRef) will be set to the + same value automatically if one of them is empty and the other + is non-empty. There are two important differences between DataSource + and DataSourceRef: * While DataSource only allows two specific + types of objects, DataSourceRef allows any non-core object, + as well as PersistentVolumeClaim objects. * While DataSource + ignores disallowed values (dropping them), DataSourceRef preserves + all values, and generates an error if a disallowed value is specified. + (Beta) Using this field requires the AnyVolumeDataSource feature + gate to be enabled.' + properties: + apiGroup: + description: APIGroup is the group for the resource being + referenced. If APIGroup is not specified, the specified + Kind must be in the core API group. For any other third-party + types, APIGroup is required. + type: string + kind: + description: Kind is the type of resource being referenced + type: string + name: + description: Name is the name of resource being referenced + type: string + required: + - kind + - name + type: object + resources: + description: 'resources represents the minimum resources the volume + should have. If RecoverVolumeExpansionFailure feature is enabled + users are allowed to specify resource requirements that are + lower than previous value but must still be higher than capacity + recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum amount of compute + resources required. If Requests is omitted for a container, + it defaults to Limits if that is explicitly specified, otherwise + to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + selector: + description: selector is a label query over volumes to consider + for binding. + properties: + matchExpressions: + description: matchExpressions is a list of label selector + requirements. The requirements are ANDed. + items: + description: A label selector requirement is a selector + that contains values, a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key that the selector + applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an array of string values. If + the operator is In or NotIn, the values array must + be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced + during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. A + single {key,value} in the matchLabels map is equivalent + to an element of matchExpressions, whose key field is "key", + the operator is "In", and the values array contains only + "value". The requirements are ANDed. + type: object + type: object + storageClassName: + description: 'storageClassName is the name of the StorageClass + required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' + type: string + volumeMode: + description: volumeMode defines what type of volume is required + by the claim. Value of Filesystem is implied when not included + in claim spec. + type: string + volumeName: + description: volumeName is the binding reference to the PersistentVolume + backing this claim. + type: string + type: object + filesystemStorage: + description: FileSystemStorage defines the spec of the PersistentVolumeClaim + to be created for the assisted-service's filesystem (logs, etc). + With respect to the resource requests, the amount of filesystem + storage consumed will depend largely on the number of clusters created + (~200MB per cluster and ~2-3GiB per supported OpenShift version). + Minimum 100GiB recommended. + properties: + accessModes: + description: 'accessModes contains the desired access modes the + volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' + items: + type: string + type: array + dataSource: + description: 'dataSource field can be used to specify either: + * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) + * An existing PVC (PersistentVolumeClaim) If the provisioner + or an external controller can support the specified data source, + it will create a new volume based on the contents of the specified + data source. If the AnyVolumeDataSource feature gate is enabled, + this field will always have the same contents as the DataSourceRef + field.' + properties: + apiGroup: + description: APIGroup is the group for the resource being + referenced. If APIGroup is not specified, the specified + Kind must be in the core API group. For any other third-party + types, APIGroup is required. + type: string + kind: + description: Kind is the type of resource being referenced + type: string + name: + description: Name is the name of resource being referenced + type: string + required: + - kind + - name + type: object + dataSourceRef: + description: 'dataSourceRef specifies the object from which to + populate the volume with data, if a non-empty volume is desired. + This may be any local object from a non-empty API group (non + core object) or a PersistentVolumeClaim object. When this field + is specified, volume binding will only succeed if the type of + the specified object matches some installed volume populator + or dynamic provisioner. This field will replace the functionality + of the DataSource field and as such if both fields are non-empty, + they must have the same value. For backwards compatibility, + both fields (DataSource and DataSourceRef) will be set to the + same value automatically if one of them is empty and the other + is non-empty. There are two important differences between DataSource + and DataSourceRef: * While DataSource only allows two specific + types of objects, DataSourceRef allows any non-core object, + as well as PersistentVolumeClaim objects. * While DataSource + ignores disallowed values (dropping them), DataSourceRef preserves + all values, and generates an error if a disallowed value is specified. + (Beta) Using this field requires the AnyVolumeDataSource feature + gate to be enabled.' + properties: + apiGroup: + description: APIGroup is the group for the resource being + referenced. If APIGroup is not specified, the specified + Kind must be in the core API group. For any other third-party + types, APIGroup is required. + type: string + kind: + description: Kind is the type of resource being referenced + type: string + name: + description: Name is the name of resource being referenced + type: string + required: + - kind + - name + type: object + resources: + description: 'resources represents the minimum resources the volume + should have. If RecoverVolumeExpansionFailure feature is enabled + users are allowed to specify resource requirements that are + lower than previous value but must still be higher than capacity + recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum amount of compute + resources required. If Requests is omitted for a container, + it defaults to Limits if that is explicitly specified, otherwise + to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + selector: + description: selector is a label query over volumes to consider + for binding. + properties: + matchExpressions: + description: matchExpressions is a list of label selector + requirements. The requirements are ANDed. + items: + description: A label selector requirement is a selector + that contains values, a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key that the selector + applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an array of string values. If + the operator is In or NotIn, the values array must + be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced + during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. A + single {key,value} in the matchLabels map is equivalent + to an element of matchExpressions, whose key field is "key", + the operator is "In", and the values array contains only + "value". The requirements are ANDed. + type: object + type: object + storageClassName: + description: 'storageClassName is the name of the StorageClass + required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' + type: string + volumeMode: + description: volumeMode defines what type of volume is required + by the claim. Value of Filesystem is implied when not included + in claim spec. + type: string + volumeName: + description: volumeName is the binding reference to the PersistentVolume + backing this claim. + type: string + type: object + iPXEHTTPRoute: + description: 'IPXEHTTPRoute is controlling whether the operator is + creating plain HTTP routes iPXE hosts may not work with router cyphers + and may access artifacts via HTTP only This setting accepts "enabled,disabled", + defaults to disabled. Empty value defaults to disabled The following + endpoints would be exposed via http: * api/assisted-installer/v2/infra-envs//downloads/files?file_name=ipxe-script + in assisted-service * boot-artifacts/ and images//pxe-initrd + in -image-service' + enum: + - enabled + - disabled + type: string + imageStorage: + description: ImageStorage defines the spec of the PersistentVolumeClaim + to be created for each replica of the image service. If a PersistentVolumeClaim + is provided 2GiB per OSImage entry is required + properties: + accessModes: + description: 'accessModes contains the desired access modes the + volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' + items: + type: string + type: array + dataSource: + description: 'dataSource field can be used to specify either: + * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) + * An existing PVC (PersistentVolumeClaim) If the provisioner + or an external controller can support the specified data source, + it will create a new volume based on the contents of the specified + data source. If the AnyVolumeDataSource feature gate is enabled, + this field will always have the same contents as the DataSourceRef + field.' + properties: + apiGroup: + description: APIGroup is the group for the resource being + referenced. If APIGroup is not specified, the specified + Kind must be in the core API group. For any other third-party + types, APIGroup is required. + type: string + kind: + description: Kind is the type of resource being referenced + type: string + name: + description: Name is the name of resource being referenced + type: string + required: + - kind + - name + type: object + dataSourceRef: + description: 'dataSourceRef specifies the object from which to + populate the volume with data, if a non-empty volume is desired. + This may be any local object from a non-empty API group (non + core object) or a PersistentVolumeClaim object. When this field + is specified, volume binding will only succeed if the type of + the specified object matches some installed volume populator + or dynamic provisioner. This field will replace the functionality + of the DataSource field and as such if both fields are non-empty, + they must have the same value. For backwards compatibility, + both fields (DataSource and DataSourceRef) will be set to the + same value automatically if one of them is empty and the other + is non-empty. There are two important differences between DataSource + and DataSourceRef: * While DataSource only allows two specific + types of objects, DataSourceRef allows any non-core object, + as well as PersistentVolumeClaim objects. * While DataSource + ignores disallowed values (dropping them), DataSourceRef preserves + all values, and generates an error if a disallowed value is specified. + (Beta) Using this field requires the AnyVolumeDataSource feature + gate to be enabled.' + properties: + apiGroup: + description: APIGroup is the group for the resource being + referenced. If APIGroup is not specified, the specified + Kind must be in the core API group. For any other third-party + types, APIGroup is required. + type: string + kind: + description: Kind is the type of resource being referenced + type: string + name: + description: Name is the name of resource being referenced + type: string + required: + - kind + - name + type: object + resources: + description: 'resources represents the minimum resources the volume + should have. If RecoverVolumeExpansionFailure feature is enabled + users are allowed to specify resource requirements that are + lower than previous value but must still be higher than capacity + recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum amount of compute + resources required. If Requests is omitted for a container, + it defaults to Limits if that is explicitly specified, otherwise + to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + selector: + description: selector is a label query over volumes to consider + for binding. + properties: + matchExpressions: + description: matchExpressions is a list of label selector + requirements. The requirements are ANDed. + items: + description: A label selector requirement is a selector + that contains values, a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key that the selector + applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an array of string values. If + the operator is In or NotIn, the values array must + be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced + during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. A + single {key,value} in the matchLabels map is equivalent + to an element of matchExpressions, whose key field is "key", + the operator is "In", and the values array contains only + "value". The requirements are ANDed. + type: object + type: object + storageClassName: + description: 'storageClassName is the name of the StorageClass + required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' + type: string + volumeMode: + description: volumeMode defines what type of volume is required + by the claim. Value of Filesystem is implied when not included + in claim spec. + type: string + volumeName: + description: volumeName is the binding reference to the PersistentVolume + backing this claim. + type: string + type: object + mirrorRegistryRef: + description: 'MirrorRegistryRef is the reference to the configmap + that contains mirror registry configuration In case no configuration + is need, this field will be nil. ConfigMap must contain to entries: + ca-bundle.crt - hold the contents of mirror registry certificate/s + registries.conf - holds the content of registries.conf file configured + with mirror registries' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + mustGatherImages: + description: MustGatherImages defines a collection of operator related + must-gather images that are used if one the operators fails to be + successfully deployed + items: + properties: + name: + description: Name specifies the name of the component (e.g. + operator) that the image is used to collect information about. + type: string + openshiftVersion: + description: OpenshiftVersion is the Major.Minor version of + OpenShift that this image is to be associated with. + type: string + url: + description: Url specifies the path to the Operating System + image. + type: string + required: + - name + - openshiftVersion + - url + type: object + type: array + osImages: + description: OSImages defines a collection of Operating System images + (ie. RHCOS images) that the assisted-service should use as the base + when generating discovery ISOs. + items: + description: OSImage defines an Operating System image and the OpenShift + version it is associated with. + properties: + cpuArchitecture: + description: The CPU architecture of the image (x86_64/arm64/etc). + type: string + openshiftVersion: + description: OpenshiftVersion is the Major.Minor version of + OpenShift that this image is to be associated with. + type: string + rootFSUrl: + description: 'rootFSUrl specifies the path to the root filesystem. + Deprecated: this field is ignored (will be removed in a future + release).' + type: string + url: + description: Url specifies the path to the Operating System + image. + type: string + version: + description: Version is the Operating System version of the + image. + type: string + required: + - openshiftVersion + - url + - version + type: object + type: array + unauthenticatedRegistries: + description: UnauthenticatedRegistries is a list of registries from + which container images can be pulled without authentication. They + will be appended to the default list (quay.io, registry.svc.ci.openshift.org). + Any registry on this list will not require credentials to be in + the pull secret validated by the assisted-service. + items: + type: string + type: array + required: + - databaseStorage + - filesystemStorage + type: object + status: + description: AgentServiceConfigStatus defines the observed state of AgentServiceConfig + properties: + conditions: + items: + description: Condition represents the state of the operator's reconciliation + functionality. + properties: + lastHeartbeatTime: + format: date-time + type: string + lastTransitionTime: + format: date-time + type: string + message: + type: string + reason: + type: string + status: + type: string + type: + description: ConditionType is the state of the operator's reconciliation + functionality. + type: string + required: + - status + - type + type: object + type: array + type: object + type: object + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] +--- +apiVersion: agent-install.openshift.io/v1beta1 +kind: AgentServiceConfig +metadata: + name: agent +spec: + databaseStorage: + storageClassName: lvms-vg1 + accessModes: + - ReadWriteOnce + resources: + requests: + storage: {{.DATABASE_STORAGE_SIZE}} + filesystemStorage: + storageClassName: lvms-vg1 + accessModes: + - ReadWriteOnce + resources: + requests: + storage: {{.FILESYSTEM_STORAGE_SIZE}} + imageStorage: + storageClassName: lvms-vg1 + accessModes: + - ReadWriteOnce + resources: + requests: + storage: {{.IMAGE_STORAGE_SIZE}} +`