Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions api/definitions/v1.deploymentlog/description.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
A deployment log is a virtual resource used by the OpenShift client tool for retrieving the logs for a deployment.
93 changes: 90 additions & 3 deletions api/swagger-spec/oapi-v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -4212,6 +4212,81 @@
}
]
},
{
"path": "/oapi/v1/namespaces/{namespace}/deploymentconfigs/{name}/log",
"description": "OpenShift REST API, version v1",
"operations": [
{
"type": "v1.DeploymentLog",
"method": "GET",
"summary": "read log of the specified DeploymentLog",
"nickname": "readNamespacedDeploymentLogLog",
"parameters": [
{
"type": "string",
"paramType": "query",
"name": "pretty",
"description": "If 'true', then the output is pretty printed.",
"required": false,
"allowMultiple": false
},
{
"type": "boolean",
"paramType": "query",
"name": "follow",
"description": "",
"required": false,
"allowMultiple": false
},
{
"type": "boolean",
"paramType": "query",
"name": "nowait",
"description": "",
"required": false,
"allowMultiple": false
},
{
"type": "*int",
"paramType": "query",
"name": "version",
"description": "",
"required": false,
"allowMultiple": false
},
{
"type": "string",
"paramType": "path",
"name": "namespace",
"description": "object name and auth scope, such as for teams and projects",
"required": true,
"allowMultiple": false
},
{
"type": "string",
"paramType": "path",
"name": "name",
"description": "name of the DeploymentLog",
"required": true,
"allowMultiple": false
}
],
"responseMessages": [
{
"code": 200,
"message": "OK",
"responseModel": "v1.DeploymentLog"
}
],
"produces": [
"application/json"
],
"consumes": [
"*/*"
]
}
]
},
{
"path": "/oapi/v1/namespaces/{namespace}/generatedeploymentconfigs/{name}",
"description": "OpenShift REST API, version v1",
Expand Down Expand Up @@ -14556,6 +14631,7 @@
},
"v1.BuildLog": {
"id": "v1.BuildLog",
"description": "TypeMeta describes an individual object in an API response or request with strings representing the type of the object and its API schema version. Structures that are versioned or persisted should inline TypeMeta.",
"properties": {
"kind": {
"type": "string",
Expand All @@ -14564,9 +14640,6 @@
"apiVersion": {
"type": "string",
"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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources"
},
"metadata": {
"$ref": "unversioned.ListMeta"
}
}
},
Expand Down Expand Up @@ -16269,6 +16342,20 @@
}
}
},
"v1.DeploymentLog": {
"id": "v1.DeploymentLog",
"description": "TypeMeta describes an individual object in an API response or request with strings representing the type of the object and its API schema version. Structures that are versioned or persisted should inline TypeMeta.",
"properties": {
"kind": {
"type": "string",
"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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds"
},
"apiVersion": {
"type": "string",
"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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources"
}
}
},
"v1.GroupList": {
"id": "v1.GroupList",
"required": [
Expand Down
1 change: 0 additions & 1 deletion contrib/completions/bash/oc
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,6 @@ _oc_describe()
must_have_one_noun=()
must_have_one_noun+=("build")
must_have_one_noun+=("buildconfig")
must_have_one_noun+=("buildlog")
must_have_one_noun+=("clusterpolicy")
must_have_one_noun+=("clusterpolicybinding")
must_have_one_noun+=("clusterrole")
Expand Down
1 change: 0 additions & 1 deletion contrib/completions/bash/openshift
Original file line number Diff line number Diff line change
Expand Up @@ -2423,7 +2423,6 @@ _openshift_cli_describe()
must_have_one_noun=()
must_have_one_noun+=("build")
must_have_one_noun+=("buildconfig")
must_have_one_noun+=("buildlog")
must_have_one_noun+=("clusterpolicy")
must_have_one_noun+=("clusterpolicybinding")
must_have_one_noun+=("clusterrole")
Expand Down
13 changes: 8 additions & 5 deletions docs/generated/oc_by_example_content.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -502,14 +502,17 @@ Print the logs for a resource.

[options="nowrap"]
----
# Returns snapshot of ruby-container logs from pod 123456-7890.
$ openshift cli logs 123456-7890 -c ruby-container
# Returns snapshot of ruby-container logs from pod backend.
$ openshift cli logs backend -c ruby-container

# Starts streaming of ruby-container logs from pod 123456-7890.
$ openshift cli logs -f 123456-7890 -c ruby-container
# Starts streaming of ruby-container logs from pod backend.
$ openshift cli logs -f pod/backend -c ruby-container

# Starts streaming the logs of the most recent build of the openldap BuildConfig.
# Starts streaming the logs of the most recent build of the openldap buildConfig.
$ openshift cli logs -f bc/openldap

# Starts streaming the logs of the latest deployment of the mysql deploymentConfig
$ openshift cli logs -f dc/mysql
----
====

Expand Down
33 changes: 28 additions & 5 deletions pkg/api/deep_copy_generated.go
Original file line number Diff line number Diff line change
Expand Up @@ -779,11 +779,6 @@ func deepCopy_api_BuildLog(in buildapi.BuildLog, out *buildapi.BuildLog, c *conv
} else {
out.TypeMeta = newVal.(unversioned.TypeMeta)
}
if newVal, err := c.DeepCopy(in.ListMeta); err != nil {
return err
} else {
out.ListMeta = newVal.(unversioned.ListMeta)
}
return nil
}

Expand Down Expand Up @@ -1349,6 +1344,32 @@ func deepCopy_api_DeploymentDetails(in deployapi.DeploymentDetails, out *deploya
return nil
}

func deepCopy_api_DeploymentLog(in deployapi.DeploymentLog, out *deployapi.DeploymentLog, c *conversion.Cloner) error {
if newVal, err := c.DeepCopy(in.TypeMeta); err != nil {
return err
} else {
out.TypeMeta = newVal.(unversioned.TypeMeta)
}
return nil
}

func deepCopy_api_DeploymentLogOptions(in deployapi.DeploymentLogOptions, out *deployapi.DeploymentLogOptions, c *conversion.Cloner) error {
if newVal, err := c.DeepCopy(in.TypeMeta); err != nil {
return err
} else {
out.TypeMeta = newVal.(unversioned.TypeMeta)
}
out.Follow = in.Follow
out.NoWait = in.NoWait
if in.Version != nil {
out.Version = new(int)
*out.Version = *in.Version
} else {
out.Version = nil
}
return nil
}

func deepCopy_api_DeploymentStrategy(in deployapi.DeploymentStrategy, out *deployapi.DeploymentStrategy, c *conversion.Cloner) error {
out.Type = in.Type
if in.CustomParams != nil {
Expand Down Expand Up @@ -2725,6 +2746,8 @@ func init() {
deepCopy_api_DeploymentConfigRollback,
deepCopy_api_DeploymentConfigRollbackSpec,
deepCopy_api_DeploymentDetails,
deepCopy_api_DeploymentLog,
deepCopy_api_DeploymentLogOptions,
deepCopy_api_DeploymentStrategy,
deepCopy_api_DeploymentTemplate,
deepCopy_api_DeploymentTriggerImageChangeParams,
Expand Down
82 changes: 76 additions & 6 deletions pkg/api/v1/conversion_generated.go
Original file line number Diff line number Diff line change
Expand Up @@ -1212,9 +1212,6 @@ func autoconvert_api_BuildLog_To_v1_BuildLog(in *buildapi.BuildLog, out *apiv1.B
if err := s.Convert(&in.TypeMeta, &out.TypeMeta, 0); err != nil {
return err
}
if err := s.Convert(&in.ListMeta, &out.ListMeta, 0); err != nil {
return err
}
return nil
}

Expand Down Expand Up @@ -1847,9 +1844,6 @@ func autoconvert_v1_BuildLog_To_api_BuildLog(in *apiv1.BuildLog, out *buildapi.B
if err := s.Convert(&in.TypeMeta, &out.TypeMeta, 0); err != nil {
return err
}
if err := s.Convert(&in.ListMeta, &out.ListMeta, 0); err != nil {
return err
}
return nil
}

Expand Down Expand Up @@ -2418,6 +2412,42 @@ func convert_api_DeploymentConfigRollbackSpec_To_v1_DeploymentConfigRollbackSpec
return autoconvert_api_DeploymentConfigRollbackSpec_To_v1_DeploymentConfigRollbackSpec(in, out, s)
}

func autoconvert_api_DeploymentLog_To_v1_DeploymentLog(in *deployapi.DeploymentLog, out *deployapiv1.DeploymentLog, s conversion.Scope) error {
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
defaulting.(func(*deployapi.DeploymentLog))(in)
}
if err := s.Convert(&in.TypeMeta, &out.TypeMeta, 0); err != nil {
return err
}
return nil
}

func convert_api_DeploymentLog_To_v1_DeploymentLog(in *deployapi.DeploymentLog, out *deployapiv1.DeploymentLog, s conversion.Scope) error {
return autoconvert_api_DeploymentLog_To_v1_DeploymentLog(in, out, s)
}

func autoconvert_api_DeploymentLogOptions_To_v1_DeploymentLogOptions(in *deployapi.DeploymentLogOptions, out *deployapiv1.DeploymentLogOptions, s conversion.Scope) error {
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
defaulting.(func(*deployapi.DeploymentLogOptions))(in)
}
if err := s.Convert(&in.TypeMeta, &out.TypeMeta, 0); err != nil {
return err
}
out.Follow = in.Follow
out.NoWait = in.NoWait
if in.Version != nil {
out.Version = new(int)
*out.Version = *in.Version
} else {
out.Version = nil
}
return nil
}

func convert_api_DeploymentLogOptions_To_v1_DeploymentLogOptions(in *deployapi.DeploymentLogOptions, out *deployapiv1.DeploymentLogOptions, s conversion.Scope) error {
return autoconvert_api_DeploymentLogOptions_To_v1_DeploymentLogOptions(in, out, s)
}

func autoconvert_v1_DeploymentConfig_To_api_DeploymentConfig(in *deployapiv1.DeploymentConfig, out *deployapi.DeploymentConfig, s conversion.Scope) error {
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
defaulting.(func(*deployapiv1.DeploymentConfig))(in)
Expand Down Expand Up @@ -2495,6 +2525,42 @@ func convert_v1_DeploymentConfigRollbackSpec_To_api_DeploymentConfigRollbackSpec
return autoconvert_v1_DeploymentConfigRollbackSpec_To_api_DeploymentConfigRollbackSpec(in, out, s)
}

func autoconvert_v1_DeploymentLog_To_api_DeploymentLog(in *deployapiv1.DeploymentLog, out *deployapi.DeploymentLog, s conversion.Scope) error {
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
defaulting.(func(*deployapiv1.DeploymentLog))(in)
}
if err := s.Convert(&in.TypeMeta, &out.TypeMeta, 0); err != nil {
return err
}
return nil
}

func convert_v1_DeploymentLog_To_api_DeploymentLog(in *deployapiv1.DeploymentLog, out *deployapi.DeploymentLog, s conversion.Scope) error {
return autoconvert_v1_DeploymentLog_To_api_DeploymentLog(in, out, s)
}

func autoconvert_v1_DeploymentLogOptions_To_api_DeploymentLogOptions(in *deployapiv1.DeploymentLogOptions, out *deployapi.DeploymentLogOptions, s conversion.Scope) error {
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
defaulting.(func(*deployapiv1.DeploymentLogOptions))(in)
}
if err := s.Convert(&in.TypeMeta, &out.TypeMeta, 0); err != nil {
return err
}
out.Follow = in.Follow
out.NoWait = in.NoWait
if in.Version != nil {
out.Version = new(int)
*out.Version = *in.Version
} else {
out.Version = nil
}
return nil
}

func convert_v1_DeploymentLogOptions_To_api_DeploymentLogOptions(in *deployapiv1.DeploymentLogOptions, out *deployapi.DeploymentLogOptions, s conversion.Scope) error {
return autoconvert_v1_DeploymentLogOptions_To_api_DeploymentLogOptions(in, out, s)
}

func autoconvert_api_Image_To_v1_Image(in *imageapi.Image, out *imageapiv1.Image, s conversion.Scope) error {
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
defaulting.(func(*imageapi.Image))(in)
Expand Down Expand Up @@ -4929,6 +4995,8 @@ func init() {
autoconvert_api_DeploymentConfigRollbackSpec_To_v1_DeploymentConfigRollbackSpec,
autoconvert_api_DeploymentConfigRollback_To_v1_DeploymentConfigRollback,
autoconvert_api_DeploymentConfig_To_v1_DeploymentConfig,
autoconvert_api_DeploymentLogOptions_To_v1_DeploymentLogOptions,
autoconvert_api_DeploymentLog_To_v1_DeploymentLog,
autoconvert_api_DockerBuildStrategy_To_v1_DockerBuildStrategy,
autoconvert_api_EnvVarSource_To_v1_EnvVarSource,
autoconvert_api_EnvVar_To_v1_EnvVar,
Expand Down Expand Up @@ -5033,6 +5101,8 @@ func init() {
autoconvert_v1_DeploymentConfigRollbackSpec_To_api_DeploymentConfigRollbackSpec,
autoconvert_v1_DeploymentConfigRollback_To_api_DeploymentConfigRollback,
autoconvert_v1_DeploymentConfig_To_api_DeploymentConfig,
autoconvert_v1_DeploymentLogOptions_To_api_DeploymentLogOptions,
autoconvert_v1_DeploymentLog_To_api_DeploymentLog,
autoconvert_v1_DockerBuildStrategy_To_api_DockerBuildStrategy,
autoconvert_v1_EnvVarSource_To_api_EnvVarSource,
autoconvert_v1_EnvVar_To_api_EnvVar,
Expand Down
33 changes: 28 additions & 5 deletions pkg/api/v1/deep_copy_generated.go
Original file line number Diff line number Diff line change
Expand Up @@ -803,11 +803,6 @@ func deepCopy_v1_BuildLog(in apiv1.BuildLog, out *apiv1.BuildLog, c *conversion.
} else {
out.TypeMeta = newVal.(unversioned.TypeMeta)
}
if newVal, err := c.DeepCopy(in.ListMeta); err != nil {
return err
} else {
out.ListMeta = newVal.(unversioned.ListMeta)
}
return nil
}

Expand Down Expand Up @@ -1408,6 +1403,32 @@ func deepCopy_v1_DeploymentDetails(in deployapiv1.DeploymentDetails, out *deploy
return nil
}

func deepCopy_v1_DeploymentLog(in deployapiv1.DeploymentLog, out *deployapiv1.DeploymentLog, c *conversion.Cloner) error {
if newVal, err := c.DeepCopy(in.TypeMeta); err != nil {
return err
} else {
out.TypeMeta = newVal.(unversioned.TypeMeta)
}
return nil
}

func deepCopy_v1_DeploymentLogOptions(in deployapiv1.DeploymentLogOptions, out *deployapiv1.DeploymentLogOptions, c *conversion.Cloner) error {
if newVal, err := c.DeepCopy(in.TypeMeta); err != nil {
return err
} else {
out.TypeMeta = newVal.(unversioned.TypeMeta)
}
out.Follow = in.Follow
out.NoWait = in.NoWait
if in.Version != nil {
out.Version = new(int)
*out.Version = *in.Version
} else {
out.Version = nil
}
return nil
}

func deepCopy_v1_DeploymentStrategy(in deployapiv1.DeploymentStrategy, out *deployapiv1.DeploymentStrategy, c *conversion.Cloner) error {
out.Type = in.Type
if in.CustomParams != nil {
Expand Down Expand Up @@ -2639,6 +2660,8 @@ func init() {
deepCopy_v1_DeploymentConfigSpec,
deepCopy_v1_DeploymentConfigStatus,
deepCopy_v1_DeploymentDetails,
deepCopy_v1_DeploymentLog,
deepCopy_v1_DeploymentLogOptions,
deepCopy_v1_DeploymentStrategy,
deepCopy_v1_DeploymentTriggerImageChangeParams,
deepCopy_v1_DeploymentTriggerPolicy,
Expand Down
Loading