Browse Source

upstream some differences from enterprise (#8902)

pull/8910/head
R.B. Boyer 4 years ago committed by GitHub
parent
commit
e113dc0fe2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      agent/consul/state/catalog_events_test.go
  2. 0
      agent/consul/state/delay_oss.go
  3. 6
      api/namespace.go
  4. 1
      build-support/scripts/proto-gen.sh

4
agent/consul/state/catalog_events_test.go

@ -1420,6 +1420,7 @@ func newTestEventServiceHealthRegister(index uint64, nodeNum int, svc string) st
CreateIndex: index,
ModifyIndex: index,
},
EnterpriseMeta: *structs.DefaultEnterpriseMeta(),
},
Checks: []*structs.HealthCheck{
{
@ -1431,6 +1432,7 @@ func newTestEventServiceHealthRegister(index uint64, nodeNum int, svc string) st
CreateIndex: index,
ModifyIndex: index,
},
EnterpriseMeta: *structs.DefaultEnterpriseMeta(),
},
{
Node: node,
@ -1444,6 +1446,7 @@ func newTestEventServiceHealthRegister(index uint64, nodeNum int, svc string) st
CreateIndex: index,
ModifyIndex: index,
},
EnterpriseMeta: *structs.DefaultEnterpriseMeta(),
},
},
},
@ -1486,6 +1489,7 @@ func newTestEventServiceHealthDeregister(index uint64, nodeNum int, svc string)
CreateIndex: 10,
ModifyIndex: 10,
},
EnterpriseMeta: *structs.DefaultEnterpriseMeta(),
},
},
},

0
agent/consul/state/delay.go → agent/consul/state/delay_oss.go

6
api/namespace.go

@ -26,7 +26,7 @@ type Namespace struct {
// DeletedAt is the time when the Namespace was marked for deletion
// This is nullable so that we can omit if empty when encoding in JSON
DeletedAt *time.Time `json:"DeletedAt,omitempty"`
DeletedAt *time.Time `json:"DeletedAt,omitempty" alias:"deleted_at"`
// CreateIndex is the Raft index at which the Namespace was created
CreateIndex uint64 `json:"CreateIndex,omitempty"`
@ -39,10 +39,10 @@ type Namespace struct {
type NamespaceACLConfig struct {
// PolicyDefaults is the list of policies that should be used for the parent authorizer
// of all tokens in the associated namespace.
PolicyDefaults []ACLLink `json:"PolicyDefaults"`
PolicyDefaults []ACLLink `json:"PolicyDefaults" alias:"policy_defaults"`
// RoleDefaults is the list of roles that should be used for the parent authorizer
// of all tokens in the associated namespace.
RoleDefaults []ACLLink `json:"RoleDefaults"`
RoleDefaults []ACLLink `json:"RoleDefaults" alias:"role_defaults"`
}
// Namespaces can be used to manage Namespaces in Consul Enterprise..

1
build-support/scripts/proto-gen.sh

@ -76,6 +76,7 @@ function main {
gogo_proto_imp_replace="${gogo_proto_imp_replace},Mgoogle/protobuf/struct.proto=github.com/gogo/protobuf/types"
gogo_proto_imp_replace="${gogo_proto_imp_replace},Mgoogle/api/annotations.proto=github.com/gogo/googleapis/google/api"
gogo_proto_imp_replace="${gogo_proto_imp_replace},Mgoogle/protobuf/field_mask.proto=github.com/gogo/protobuf/types"
gogo_proto_imp_replace="${gogo_proto_imp_replace},Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types"
local proto_go_path=${proto_path%%.proto}.pb.go
local proto_go_bin_path=${proto_path%%.proto}.pb.binary.go

Loading…
Cancel
Save