fluid icon indicating copy to clipboard operation
fluid copied to clipboard

[FEATURES] upgrade AlluxioRuntimeSpec Optional Field to Pointer types

Open allenhaozi opened this issue 4 years ago • 0 comments

current

// AlluxioRuntimeSpec defines the desired state of AlluxioRuntime
type AlluxioRuntimeSpec struct {
	// The version information that instructs fluid to orchestrate a particular version of Alluxio.
	AlluxioVersion VersionSpec `json:"alluxioVersion,omitempty"`

	// Desired state for Alluxio master
	Master AlluxioCompTemplateSpec `json:"master,omitempty"`

	// Desired state for Alluxio job master
	JobMaster AlluxioCompTemplateSpec `json:"jobMaster,omitempty"`

	// Desired state for Alluxio worker
	Worker AlluxioCompTemplateSpec `json:"worker,omitempty"`

	// Desired state for Alluxio job Worker
	JobWorker AlluxioCompTemplateSpec `json:"jobWorker,omitempty"`

	// Desired state for Alluxio API Gateway
	APIGateway AlluxioCompTemplateSpec `json:"apiGateway,omitempty"`

	// The spec of init users
	InitUsers InitUsersSpec `json:"initUsers,omitempty"`

	// Desired state for Alluxio Fuse
	Fuse AlluxioFuseSpec `json:"fuse,omitempty"`

	// Configurable properties for Alluxio system. <br>
	// Refer to <a href="https://docs.alluxio.io/os/user/stable/en/reference/Properties-List.html">Alluxio Configuration Properties</a> for more info
	Properties map[string]string `json:"properties,omitempty"`

	// Options for JVM
	JvmOptions []string `json:"jvmOptions,omitempty"`

	// Tiered storage used by Alluxio
	TieredStore TieredStore `json:"tieredstore,omitempty"`

	// Management strategies for the dataset to which the runtime is bound
	Data Data `json:"data,omitempty"`

	// The replicas of the worker, need to be specified
	Replicas int32 `json:"replicas,omitempty"`

	// Manage the user to run Alluxio Runtime
	RunAs *User `json:"runAs,omitempty"`

	// Disable monitoring for Alluxio Runtime
	// Prometheus is enabled by default
	// +optional
	DisablePrometheus bool `json:"disablePrometheus,omitempty"`

	// Name of the configMap used to support HDFS configurations when using HDFS as Alluxio's UFS. The configMap
	// must be in the same namespace with the AlluxioRuntime. The configMap should contain user-specific HDFS conf files in it.
	// For now, only "hdfs-site.xml" and "core-site.xml" are supported. It must take the filename of the conf file as the key and content
	// of the file as the value.
	// +optional
	HadoopConfig string `json:"hadoopConfig,omitempty"`
}

desired

// AlluxioRuntimeSpec defines the desired state of AlluxioRuntime
type AlluxioRuntimeSpec struct {
	// The version information that instructs fluid to orchestrate a particular version of Alluxio.
	// +optional
        AlluxioVersion VersionSpec `json:"alluxioVersion,omitempty"`

	// Desired state for Alluxio master
	// +optional
        Master AlluxioCompTemplateSpec `json:"master,omitempty"`

	// Desired state for Alluxio job master
	// +optional
        JobMaster AlluxioCompTemplateSpec `json:"jobMaster,omitempty"`

	// Desired state for Alluxio worker
	// +optional
        Worker AlluxioCompTemplateSpec `json:"worker,omitempty"`

	// Desired state for Alluxio job Worker
	// +optional
        JobWorker AlluxioCompTemplateSpec `json:"jobWorker,omitempty"`

	// Desired state for Alluxio API Gateway
	// +optional
        APIGateway AlluxioCompTemplateSpec `json:"apiGateway,omitempty"`

	// The spec of init users
	// +optional
         InitUsers InitUsersSpec `json:"initUsers,omitempty"`

	// Desired state for Alluxio Fuse
	// +optional
        Fuse AlluxioFuseSpec `json:"fuse,omitempty"`

	// Configurable properties for Alluxio system. <br>
	// Refer to <a href="https://docs.alluxio.io/os/user/stable/en/reference/Properties-List.html">Alluxio Configuration Properties</a> for more info
        // +optional
	Properties map[string]string `json:"properties,omitempty"`

	// Options for JVM
        // +optional	
        JvmOptions []string `json:"jvmOptions,omitempty"`

	// Tiered storage used by Alluxio
	TieredStore TieredStore `json:"tieredstore,omitempty"`

	// Management strategies for the dataset to which the runtime is bound
	// +optional
         Data Data `json:"data,omitempty"`

	// The replicas of the worker, need to be specified
	Replicas int32 `json:"replicas,omitempty"`

	// Manage the user to run Alluxio Runtime
	// +optional
        RunAs *User `json:"runAs,omitempty"`

	// Disable monitoring for Alluxio Runtime
	// Prometheus is enabled by default
	// +optional
	DisablePrometheus bool `json:"disablePrometheus,omitempty"`

	// Name of the configMap used to support HDFS configurations when using HDFS as Alluxio's UFS. The configMap
	// must be in the same namespace with the AlluxioRuntime. The configMap should contain user-specific HDFS conf files in it.
	// For now, only "hdfs-site.xml" and "core-site.xml" are supported. It must take the filename of the conf file as the key and content
	// of the file as the value.
	// +optional
	HadoopConfig string `json:"hadoopConfig,omitempty"`
}

allenhaozi avatar Aug 24 '21 10:08 allenhaozi